Skip to content

ci(auto-merge): add owner tier#94

Merged
ANcpLua merged 1 commit into
mainfrom
add-owner-automerge-tier
May 4, 2026
Merged

ci(auto-merge): add owner tier#94
ANcpLua merged 1 commit into
mainfrom
add-owner-automerge-tier

Conversation

@ANcpLua
Copy link
Copy Markdown
Owner

@ANcpLua ANcpLua commented May 4, 2026

Summary

Adds an owner-auto-merge tier 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

  • Workflow parses
  • CI green
  • Future owner PRs auto-merge once CI passes

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings May 4, 2026 14:55
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 4, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: ddbbcfaa-ad5d-4f34-b8c5-1253f0395392

📥 Commits

Reviewing files that changed from the base of the PR and between d837f9d and f6ca3b6.

📒 Files selected for processing (1)
  • .github/workflows/auto-merge.yml
📜 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)
  • GitHub Check: Agent
  • GitHub Check: build
🧰 Additional context used
📓 Path-based instructions (1)
.github/**

⚙️ CodeRabbit configuration file

GitHub Actions workflows. Review for: action version pinning (use SHA not tags for third-party actions), proper secret handling (no secrets in logs, use GITHUB_TOKEN where possible), unnecessary workflow triggers, and job dependency correctness. Flag missing concurrency groups on push-triggered workflows. Ensure matrix strategies cover the supported .NET TFMs.

Files:

  • .github/workflows/auto-merge.yml
🔇 Additional comments (2)
.github/workflows/auto-merge.yml (2)

8-8: Comment matches the new tier.

The updated tier list accurately reflects the workflow behavior.


141-153: Owner auto-merge looks correctly scoped.

The condition only targets owner-authored, non-draft PRs, and the job only turns on GitHub auto-merge; branch protection still controls the actual merge.


Summary by CodeRabbit

  • Chores
    • Enhanced pull request automation for repository owners. Qualifying pull requests from the repository owner are now automatically merged using squash strategy, streamlining the merge process while maintaining code quality standards.

Walkthrough

A new owner-auto-merge job is added to the auto-merge workflow to automatically squash-merge pull requests authored by the repository owner when the PR is not in draft status.

Changes

Workflow Configuration

Layer / File(s) Summary
Auto-Merge Job
.github/workflows/auto-merge.yml
New owner-auto-merge job runs gh pr merge --auto --squash when the PR author is the repository owner and the PR is not a draft.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested labels

area:infra

🚥 Pre-merge checks | ✅ 8
✅ Passed checks (8 passed)
Check name Status Explanation
Title check ✅ Passed Title follows conventional commit format with ci type and auto-merge scope, is under 72 characters, and accurately describes the main change of adding owner-tier auto-merge functionality.
Description check ✅ Passed Description clearly explains the change, rationale, and test plan—directly related to the workflow modification for owner-authored PRs.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Otel Instrumentation Required ✅ Passed PR modifies only GitHub Actions workflow configuration; no C# code or service registration changes present.
No Unbounded Mcp Responses ✅ Passed PR modifies only .github/workflows/auto-merge.yml with no MCP tool changes in src/qyl.mcp/.
Duckdb Backpressure On Write Paths ✅ Passed PR modifies only .github/workflows/auto-merge.yml, adding GitHub CLI orchestration with no new DuckDB write paths.
Cancellationtoken Threading ✅ Passed PR modifies only .github/workflows/auto-merge.yml; no C# source files touched, so public async method check prerequisite not met.

✏️ 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 @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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-merge job that attempts to enable gh pr merge --auto --squash for non-draft PRs.
  • Reuses the existing pattern of invoking the GitHub CLI with GITHUB_TOKEN against 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 &&
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 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 &&
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@ANcpLua ANcpLua merged commit bb5fb30 into main May 4, 2026
24 checks passed
@ANcpLua ANcpLua deleted the add-owner-automerge-tier branch May 4, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants