Skip to content

Require a review on pull requests and allow auto-merge - #303

Merged
mraible merged 2 commits into
masterfrom
require-review-and-auto-merge
Nov 17, 2026
Merged

mraible merged 2 commits into
masterfrom
require-review-and-auto-merge

Conversation

@mraible

@mraible mraible commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Committers can't change these repository settings in GitHub, so this sets them in .asf.yaml:

  • pull_requests.allow_auto_merge turns on GitHub's auto-merge.
  • pull_requests.del_branch_on_merge deletes a pull request's branch once it's merged.
  • The existing master ruleset now requires one approving review, given after the last push (require_last_push_approval), and the CI checks: Build+Test on JDK 21 and 25, License headers, the three UI test jobs, and CodeQL for Java and JavaScript.
  • A new ruleset for roller-6.1.x does the same with that branch's checks (Build+Test on JDK 11, 17, 21 and 25, and CodeQL), so its pull requests can't auto-merge without a review either.

The checks are required because auto-merge only waits for required checks; with a review alone, a pull request would merge as soon as it's approved, while CI is still running. A pull request author's own approval doesn't count, and a push after the approval needs a new one, so each merge needs another committer's review of what actually merges. Auto-merge counts only "Approve" reviews, not comments.

If a check is renamed in a workflow, it has to be renamed here as well, or pull requests will wait for a check that never reports.

The .asf.yaml rulesets for master and roller-6.1.x now require one approving review and the CI checks before a pull request can merge, which lets GitHub's auto-merge be turned on. Merged branches are deleted automatically.
@mraible
mraible requested a review from snoopdave November 17, 2026 05:00

@snoopdave snoopdave left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

NIce.

@mraible
mraible merged commit 23eb593 into master Nov 17, 2026
9 checks passed
@mraible
mraible deleted the require-review-and-auto-merge branch November 17, 2026 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants