Conversation
With this, no need to enable auto-merge.
There was a problem hiding this comment.
Pull Request Overview
This PR replaces the standalone merge gatekeeper workflow with a combined CI checker workflow that both validates PR status and automatically merges specific bot PRs after all checks pass.
- Removes the dedicated merge-gatekeeper.yml workflow file
- Creates a new ci-checker.yml workflow that incorporates the merge gatekeeper functionality
- Adds automatic PR merging for renovate[bot] PRs when triggered by autofix-ci[bot] and no reviewers are requested
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| .github/workflows/merge-gatekeeper.yml | Removed standalone merge gatekeeper workflow |
| .github/workflows/ci-checker.yml | New combined workflow with gatekeeper and auto-merge functionality |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
WalkthroughIntroduces a new workflow .github/workflows/ci-checker.yml with two jobs: a merge gatekeeper using upsidr/merge-gatekeeper and a conditional auto squash-merge for Renovate/autofix PRs. Removes the previous .github/workflows/merge-gatekeeper.yml workflow. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (7)
.github/workflows/ci-checker.yml (7)
14-14: Normalize runner label to canonical value.GitHub docs use
ubuntu-latest(lowercase). While labels may be case-insensitive, standardizing reduces surprises and avoids linter noise.Apply this diff:
- runs-on: Ubuntu-Latest + runs-on: ubuntu-latest…and likewise for the second job:
- runs-on: Ubuntu-Latest + runs-on: ubuntu-latestAlso applies to: 32-32
11-15: Gatekeeper job may need pull-requests: read.Some gatekeeper actions inspect PR metadata (draft state, reviews, etc.). If
upsidr/merge-gatekeeperneeds PR context, addpull-requests: readto avoid permission denials under the workflow’s restrictive defaults.Proposed change:
permissions: checks: read statuses: read + pull-requests: readIf unnecessary, feel free to skip—just flagging in case the action relies on PR fields.
15-15: Gatekeeper timeout may be too short.If your CI regularly exceeds 10 minutes, the gatekeeper can time out before all checks settle. Consider 20–30 minutes to be safe.
- timeout-minutes: 10 + timeout-minutes: 30
25-33: Auto-merge guardrail improvements (draft, teams, base branch).The current
if:misses team reviewers and draft status, and doesn’t constrain the base branch. Recommend tightening to avoid premature merges.Apply this diff:
- if: ${{ github.event.pull_request.user.login == 'renovate[bot]' && github.event.sender.login == 'autofix-ci[bot]' && toJson(github.event.pull_request.requested_reviewers) == '[]' }} + if: ${{ + github.event.pull_request.user.login == 'renovate[bot]' && + github.event.pull_request.base.ref == 'main' && + github.event.pull_request.draft == false && + length(github.event.pull_request.requested_reviewers) == 0 && + length(github.event.pull_request.requested_teams) == 0 && + (github.event.sender.login == 'autofix-ci[bot]' || github.event.sender.login == 'renovate[bot]') + }}If you intentionally want to trigger only on
autofix-ci[bot]events, keep that part as-is—just add the draft/teams/base checks.
33-33: Increase merge step timeout.Merges plus branch deletion can exceed 60 seconds during API lag; suggest a small buffer.
- timeout-minutes: 1 + timeout-minutes: 5
35-39: Prefer merging by PR number and delete the branch post-merge.Using
GITHUB_HEAD_REFcan be ambiguous for forks; merging by PR number is unambiguous. Deleting the head branch keeps things tidy.- - name: 🔀 Squash merge PR - run: gh pr merge --repo="$GITHUB_REPOSITORY" "$GITHUB_HEAD_REF" --squash - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: 🔀 Squash merge PR + run: gh pr merge --repo "$GITHUB_REPOSITORY" ${{ github.event.pull_request.number }} --squash --delete-branch + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}Optionally add
--autoif you want GH to wait for checks itself and merge when ready (gatekeeper already enforces this, so not strictly needed).
3-5: Add workflow concurrency to prevent duplicate merges.If multiple PR events fire close together (e.g., synchronize + label), you can serialize runs per-PR to avoid racing the merge.
on: pull_request: +concurrency: + group: ci-checker-pr-${{ github.event.pull_request.number }} + cancel-in-progress: trueIf you prefer job-scoped concurrency, add the same block under the
merge-prjob instead.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
.github/workflows/ci-checker.yml(1 hunks).github/workflows/merge-gatekeeper.yml(0 hunks)
💤 Files with no reviewable changes (1)
- .github/workflows/merge-gatekeeper.yml
🔇 Additional comments (3)
.github/workflows/ci-checker.yml (3)
6-6: Good use of restrictive default permissions.Setting
permissions: {}at workflow level and granting minimal, job-scoped permissions is a solid security posture.
18-24: Verify the “ignored” actor name.
ignored: CodeRabbitmight not match the actual bot login (often ends with[bot]). Confirm the exact login(s) you intend to ignore; otherwise, the filter won’t apply.Would you like me to look up the exact bot account(s) used in this repo’s PRs and propose the precise values?
19-23: Pinned action by commit — great.Pinning
upsidr/merge-gatekeeperto a commit SHA with an inline version comment is a good supply-chain practice.
close #
✏️ Description
With this, no need to enable auto-merge.