ci: make owner auto-merge opt-in via automerge label - #446
Merged
Conversation
Auto-merge was enabled on every owner PR on open/synchronize/ready, so PRs merged the moment branch protection was satisfied — before review was resolved — and stacked PRs targeting an unprotected feature branch merged instantly (this collapsed a stacked UI PR into its base). Now the owner job only enables auto-merge when the PR carries the `automerge` label (and reacts to the `labeled` event), so merging is an explicit opt-in. Dependabot auto-merge is unchanged. Requires an `automerge` label in the repo (create with `gh label create automerge`). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe automerge GitHub Actions workflow's pull_request trigger now includes the labeled event type. The automerge-owner job's condition is changed to require both the author login match and the presence of an automerge label, instead of author match alone. Inline comments were updated accordingly. ChangesAutomerge Workflow Update
Estimated code review effort: 1 (Trivial) | ~3 minutes Suggested labels
Suggested reviewerstomymaritano 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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.
Problem
The Auto-merge workflow enabled auto-merge on every owner PR on
opened/synchronize/reopened/ready_for_review. Consequences:develophad auto-merge enabled automatically, so they merged the moment branch protection was satisfied — before CodeRabbit review was resolved (the exact CodeRabbit-first violation we keep hitting).Fix
Owner auto-merge is now opt-in via the
automergelabel:automerge-ownerjob only runs when the PR carries theautomergelabel, and the workflow now also reacts to thelabeledevent.The
automergelabel has been created in the repo.Testing
Workflow-only change (YAML). Verified the
if:usescontains(github.event.pull_request.labels.*.name, 'automerge')and thelabeledtrigger is present so applying the label enables auto-merge.🤖 Generated with Claude Code
Summary by CodeRabbit