Skip to content

ci: require one approving review on master - #20796

Merged
amaechler merged 8 commits into
apache:masterfrom
amaechler:require-pr-approval
Oct 30, 2026
Merged

amaechler merged 8 commits into
apache:masterfrom
amaechler:require-pr-approval

Conversation

@amaechler

@amaechler amaechler commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Description

This PR adds an ASF config entry so every PR into master requires 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.yaml rulesets, which the ASF docs recommend over the older protected_branches syntax. Rulesets sit alongside the existing classic branch protection on master and the old 0.x branches instead of replacing it, so those stay as they are.

Require one approving review on master

The Require review ruleset sets required_approving_review_count: 1 for 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 of druid-committers are 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 covers master; release branches such as 39.0.0 still allow merging without an approval.

Add the ASF Infra default branch protection

The Default Branch Protection ruleset blocks force-pushes to and deletion of master and all release branches, with only the ASF Infra root team able to bypass it. Both blocks are on by default for .asf.yaml rulesets, 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, its release/* and rel/* 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:

  • been self-reviewed.

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.
@amaechler
amaechler requested review from cryptoe and gianm October 29, 2026 21:14
@amaechler amaechler self-assigned this Oct 29, 2026
@amaechler amaechler added the Area - Dev For items related to the project itself, like dev docs and checklists, but not CI label Oct 29, 2026
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
amaechler marked this pull request as ready for review October 29, 2026 21:52
@amaechler
amaechler merged commit fcbfed5 into apache:master Oct 30, 2026
27 of 28 checks passed
@amaechler
amaechler deleted the require-pr-approval branch October 30, 2026 15:13
@github-actions github-actions Bot added this to the 40.0.0 milestone Oct 30, 2026

@FrankChen021 FrankChen021 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

Comment thread .asf.yaml Resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area - Dev For items related to the project itself, like dev docs and checklists, but not CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants