ci(auto-merge): add owner tier#94
Conversation
Owner-authored PRs now get auto-merge enabled on CI green — matches the existing pattern for Dependabot, Renovate, AI bots, and CodeRabbit. Branch protection still gates the merge on required status checks. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent review details⏰ Context from checks skipped due to timeout of 120000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🧰 Additional context used📓 Path-based instructions (1).github/**⚙️ CodeRabbit configuration file
Files:
🔇 Additional comments (2)
Summary by CodeRabbit
WalkthroughA new ChangesWorkflow Configuration
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested labels
🚥 Pre-merge checks | ✅ 8✅ Passed checks (8 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Review rate limit: 4/5 reviews remaining, refill in 12 minutes. Comment |
There was a problem hiding this comment.
Pull request overview
Adds a new owner-auto-merge tier to the existing GitHub Actions workflow so trusted PRs can have auto-merge enabled without manual intervention. In this codebase, the change extends the centralized .github/workflows/auto-merge.yml policy that already handles Dependabot, Renovate, AI-agent, and CodeRabbit-driven merge flows.
Changes:
- Documents a new owner-focused auto-merge tier in the workflow header comments.
- Adds an
owner-auto-mergejob that attempts to enablegh pr merge --auto --squashfor non-draft PRs. - Reuses the existing pattern of invoking the GitHub CLI with
GITHUB_TOKENagainst the PR URL.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| name: Owner auto-merge | ||
| runs-on: ubuntu-latest | ||
| if: | | ||
| github.event.pull_request.user.login == github.event.repository.owner.login && |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f6ca3b622a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| name: Owner auto-merge | ||
| runs-on: ubuntu-latest | ||
| if: | | ||
| github.event.pull_request.user.login == github.event.repository.owner.login && |
There was a problem hiding this comment.
Gate owner tier by collaborator status, not repo owner login
This condition only matches when the PR author login exactly equals github.event.repository.owner.login, which is effectively never true for organization-owned repositories because PRs are authored by member user accounts, not the org account itself. In that common setup, the new tier never runs, so owner/member PRs still require manual merge and the added behavior is silently ineffective.
Useful? React with 👍 / 👎.
Summary
Adds an
owner-auto-mergetier to the existing auto-merge workflow.Why
The existing tiers fire only for Dependabot/Renovate/AI-bot accounts and CodeRabbit-approved PRs. PRs authored by the repo owner via the local `gh` CLI fall through every tier and have to be merged manually. This adds a 5th tier that enables `gh pr merge --auto --squash` whenever the PR author equals the repository owner — branch protection still gates the actual merge on required CI checks.
Test plan
🤖 Generated with Claude Code