Repository navigation
ci: require one approving review on master - #20796
Merged
Merged
Conversation
Enforce the documented rule that every pull request needs a +1 from a committer. Keep the existing protection on the old 0.x branches, since .asf.yaml removes protection from branches it does not list.
Add the ASF Infra default protection ruleset for master, and require one approving review in a separate ruleset that druid-committers can bypass.
Druid names release branches after the version, such as 39.0.0, so the release/* and rel/* patterns from the ASF default would not match them.
amaechler
marked this pull request as ready for review
October 29, 2026 21:52
gianm
approved these changes
Oct 29, 2026
This was referenced Oct 30, 2026
FrankChen021
left a comment
Member
There was a problem hiding this comment.
🟡 Changes recommended
Both new ASF ruleset entries omit the branch ruleset type, so the intended approval and branch-integrity protections may not be reconciled or enforced. Add the explicit branch discriminator before merging.
Reviewed 1 of 1 changed files; finding in 1 file.
Validation: git diff --check 6017fdd..2ab76bc passed.
| Severity | Findings |
|---|---|
| P0 | 0 |
| P1 | 1 |
| P2 | 0 |
| P3 | 0 |
| Total | 1 |
This is an automated review by Codex GPT-5.6-Luna(max)
After addressing the findings or replying to the comments, you can request another review from me to trigger a new automated review.
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 adds an ASF config entry so every PR into
masterrequires at least one approval. Our community page already says that every pull request needs one approval (+1) from a committer. This change enforces that on GitHub too.The config uses
.asf.yamlrulesets, which the ASF docs recommend over the olderprotected_branchessyntax. Rulesets sit alongside the existing classic branch protection onmasterand the old0.xbranches instead of replacing it, so those stay as they are.Require one approving review on
masterThe
Require reviewruleset setsrequired_approving_review_count: 1for the default branch. GitHub only counts approvals from people with write access, which for an ASF repo means committers. Authors can't approve their own PRs, so a committer's PR needs a second committer. Members ofdruid-committersare on the bypass list, so in an emergency a committer can still choose to merge without an approval, but it is an explicit choice rather than the default green button. The rule only coversmaster; release branches such as39.0.0still allow merging without an approval.Add the ASF Infra default branch protection
The
Default Branch Protectionruleset blocks force-pushes to and deletion ofmasterand all release branches, with only the ASF Infrarootteam able to bypass it. Both blocks are on by default for.asf.yamlrulesets, so they don't appear in the YAML. It is the ruleset ASF Infra proposed in #19466, which our stale bot closed before anyone reviewed it. As the review on #19466 pointed out, itsrelease/*andrel/*patterns don't match our release branches, which are named after the version (39.0.0,0.17.0-incubating,0.5.x). This PR uses[0-9]*.[0-9]*.*instead, which matches all 67 existing release branches and no other branch. The release process guide never force-pushes or deletes a release branch, so this doesn't change how releases are cut. It is a separate ruleset because a bypass applies to the whole ruleset, and committers shouldn't be able to bypass the force-push block.This PR has: