Repository navigation
Conversation
Add a "Require CI" ruleset so a pull request into master can only merge once the quality-gate job of the CI workflow has passed. Committers can bypass it, with the same Write repository role bypass as the review ruleset, to merge a PR whose CI is red for an unrelated reason. The check is not pinned to the GitHub Actions app: asfyaml passes raw ruleset values to the API as strings, apart from a fixed set of keys, and GitHub rejects a string integration_id.
FrankChen021
left a comment
Member
There was a problem hiding this comment.
🟢 Approval recommended
No actionable issues found. The new active ruleset is correctly scoped to the default branch, requires the documented quality-gate check, and follows the existing repository-role bypass pattern.
Reviewed 1 of 1 changed files.
Validation: git diff --check and YAML parsing passed.
This is an automated review by Codex GPT-5.6-Luna(max)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR makes a passing CI run a merge requirement on
master. It adds aRequire CIruleset to.asf.yamlthat requires thequality-gatestatus check, which #20878 adds as the one check that reports on every PR and fails unless the whole CI run passed. Today a PR shows a green merge button even when CI never ran or failed; with this ruleset, GitHub waits forquality-gateto pass.Merge this only after #20878. Until
quality-gateexists onmaster, no PR reports it, so every PR would wait for it and need a committer to bypass the rule.Committers can bypass the rule
The ruleset uses the same raw syntax and bypass actor as the
Require reviewruleset from #20804: the Write repository role (actor_id: 4), which on this repository only committers hold. A committer can still merge a PR whose CI is red for an unrelated reason, such as a flaky test, by choosing to bypass the rules in the merge box. As withRequire review, this is an explicit choice rather than the default green button.Scope and settings
masteris covered. Release branches are left out for now.strict_required_status_checks_policy: false, so a PR does not have to be up to date withmasterbefore it can merge.integration_id. Every raw-syntax ruleset in other Apache repos that requires a check names it bycontextonly, including Airflow'sCI passed(also bypassed through the Write role), Iceberg'sci-requiredand SeaTunnel'sBuild.quality-gateas cancelled, not skipped, so it blocks the merge until a new run passes. GitHub would count a skipped required check as passed.Require review, so either can be changed or dropped on its own.After merge
An open PR whose latest CI run started before #20878 landed has no
quality-gateresult. GitHub shows the check as expected and waiting until the author pushes a new commit, or a committer bypasses the rule. Mergingmasterinto the branch or rebasing it is enough.The gate is a merge requirement, not a security boundary. A PR runs its own copy of the workflow, so a PR that edits
quality-gatecan make it pass. Committers still need to review workflow changes before merging.The check name is not validated by ASF Infra. If the job is ever renamed in
unit-and-integration-tests-unified.yml, this ruleset has to be updated in the same PR.This PR has: