Skip to content

tools: Block auto-merge on reviews and recent pushes - #1579

Merged
fingolfin merged 1 commit into
mainfrom
mh/auto-merge-respect-reviews
Oct 1, 2026
Merged

fingolfin merged 1 commit into
mainfrom
mh/auto-merge-respect-reviews

Conversation

@fingolfin

Copy link
Copy Markdown
Member

The auto-merge script only read issue comments, so a "request changes" review (or any other PR review) did not stop a merge, and branch protection on main does not require reviews. Now a change request blocks until the reviewer approves or it is dismissed, and comment reviews (including inline comments) block like issue comments unless marked [noblock].

The minimum age was measured from PR creation, but scan-for-updates force-pushes newer versions onto existing automatic/* branches, so a freshly updated PR could be merged while its CI was still running. The head commit must now also be at least the minimum age old, and the Package tests passed gate check must be present and passing.

A dry run against this repository reports #1570 as blocked by its pending change request; the old script only skipped it because its tests fail.

AI disclosure: Claude Code (Claude Opus 5.5) analysed the existing setup and wrote the code, tests and this description; reviewed by a human.

🤖 Generated with Claude Code

The auto-merge script only looked at issue comments, so a pending
"request changes" review, or any other pull request review, did not
stop a merge; branch protection does not require reviews either. Now
a change request blocks until the reviewer approves or it is
dismissed, and comment reviews block like issue comments unless
marked [noblock].

The minimum age was measured from PR creation, but scan-for-updates
force-pushes newer versions onto existing PRs, so a freshly updated
PR could be merged while its CI was still running. Also require the
head commit to be old enough, and require the "Package tests passed"
gate check to be present, not just every reported required check to
pass.

Assisted-by: Claude Code (Opus 5.5)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fingolfin
fingolfin merged commit 3963f74 into main Oct 1, 2026
1 check passed
@fingolfin
fingolfin deleted the mh/auto-merge-respect-reviews branch October 1, 2026 08:35
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.

1 participant