Skip to content

fix(ci): auto-approve dependabot PRs so Mergify can squash-merge them#1020

Merged
ashleyshaw merged 2 commits into
developfrom
fix/dependabot-auto-merge
Jun 19, 2026
Merged

fix(ci): auto-approve dependabot PRs so Mergify can squash-merge them#1020
ashleyshaw merged 2 commits into
developfrom
fix/dependabot-auto-merge

Conversation

@ashleyshaw

@ashleyshaw ashleyshaw commented Jun 19, 2026

Copy link
Copy Markdown
Member

Linked issues

relates to #968

Summary

  • Root cause 1 — No auto-approval: Mergify's rules had no approval action. Branch protection on develop requires ≥1 approved review; without an approval Mergify's queue can never complete the squash-merge.
  • Root cause 2 — Wrong Mergify action name: approve: is not a valid Mergify action. The correct action is review: type: APPROVE.
  • Root cause 3 — Redundant security/non-security split: dependabot-security-label.yml applies meta:dependabot-security to virtually every dependabot PR via the broad /\bto fix\b/i pattern. Both rules queued to the same dependabot queue anyway, so they are merged into one.
  • Belt-and-suspenders — GitHub Actions backup: A new dependabot-automerge.yml workflow triggers via workflow_run when CI passes on a dependabot PR, independently approves the PR, and enables GitHub's native squash auto-merge.

Changelog

  • Fix Mergify config: replace invalid approve: with review: type: APPROVE
  • Fix Mergify config: consolidate two dependabot rules into one
  • Add dependabot-automerge.yml workflow: auto-approve + enable squash auto-merge when CI passes on dependabot PRs

Checklist (Global DoD / PR)

  • Changes are limited to the described fix
  • Branch name follows {type}/{scope}-{title} convention
  • YAML lints clean (spectral lint)
  • Branch name validator passes
  • CHANGELOG.md updated
  • No secrets or credentials committed

The previous Mergify config never merged dependabot PRs because:

1. No `approve:` action — if branch protection requires ≥1 review,
   Mergify's queue action can never complete the merge (and may refuse
   to enqueue at all).

2. Redundant security/non-security split — `dependabot-security-label.yml`
   applies `meta:dependabot-security` to virtually every dependabot PR
   via the broad `/\bto fix\b/i` pattern, so the non-security rule
   (`-label=meta:dependabot-security`) never matched. Both rules queued
   to the same place anyway, so they have been merged into one.

Changes:
- `.github/mergify.yml`: consolidate two dependabot rules → one with
  `approve:` + `queue:` actions; add `allow_checks_interruption: false`
  to the queue rule to prevent CI-cancellation races.
- `.github/workflows/dependabot-automerge.yml`: belt-and-suspenders
  GitHub Actions backup — triggers via `workflow_run` when CI passes on
  a dependabot PR, then approves the PR and enables GitHub squash
  auto-merge independently of Mergify.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dm73CCVtnGNofnRNiVqkKw
@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

✅ Template check passed after update. Thanks for fixing the PR description.

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@ashleyshaw, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 16 minutes and 1 second. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: d67bda56-6b43-44c7-a47c-5e5b866e38e4

📥 Commits

Reviewing files that changed from the base of the PR and between 5bf39c7 and 8f8ca78.

📒 Files selected for processing (3)
  • .github/mergify.yml
  • .github/workflows/dependabot-automerge.yml
  • CHANGELOG.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/dependabot-auto-merge

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request simplifies the Mergify configuration by combining Dependabot dependency and security updates into a single auto-approve and merge rule, and sets allow_checks_interruption: false in the queue rules. Feedback points out that the approve action is invalid in Mergify and should be replaced with the review action with type: APPROVE.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread .github/mergify.yml Outdated
- -draft
- -conflict
actions:
approve:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

critical

Mergify does not support an approve action directly. To automatically approve a pull request, you must use the review action with type: APPROVE.

      review:
        type: APPROVE

@mergify

mergify Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 📃 Configuration Change Requirements

Wonderful, this rule succeeded.

Mergify configuration change

  • check-success = Configuration changed

@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

🔍 Reviewer Summary for PR #1020

CI Status:success
Files changed: 3
Risk Distribution: 1 critical, 1 high, 0 medium, 1 low

Recommendations

  • ⚠️ 1 critical-risk file(s) modified (workflows, secrets)
  • ⚠️ Security-sensitive files modified (review carefully)

@ashleyshaw ashleyshaw marked this pull request as ready for review June 19, 2026 12:18
@ashleyshaw ashleyshaw enabled auto-merge (squash) June 19, 2026 12:18
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@ashleyshaw

Copy link
Copy Markdown
Member Author

@Mergifyio queue

1 similar comment
@ashleyshaw

Copy link
Copy Markdown
Member Author

@Mergifyio queue

@mergify

mergify Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

queue

☑️ Command queue ignored because it is already running from a previous command.

@mergify

mergify Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • 🟠 Waiting for queue conditions
  • ⏳ Enter queue
  • ⏳ Run checks
  • ⏳ Merge
Waiting for
  • -closed [📌 queue requirement]
  • any of: [🔀 queue conditions]
    • all of: [📌 queue conditions of queue rule Merge queue]
      • any of: [🛡 GitHub branch protection]
        • check-neutral = CI • Unified Checks (Lint, Test, Validate) / All Checks Passed
        • check-skipped = CI • Unified Checks (Lint, Test, Validate) / All Checks Passed
        • check-success = CI • Unified Checks (Lint, Test, Validate) / All Checks Passed
      • any of: [🛡 GitHub branch protection]
        • check-neutral = Validate PR Template / validate-pr-template
        • check-skipped = Validate PR Template / validate-pr-template
        • check-success = Validate PR Template / validate-pr-template
    • all of: [📌 queue conditions of queue rule dependabot]
      • label=area:dependencies
      • any of: [🛡 GitHub branch protection]
        • check-neutral = CI • Unified Checks (Lint, Test, Validate) / All Checks Passed
        • check-skipped = CI • Unified Checks (Lint, Test, Validate) / All Checks Passed
        • check-success = CI • Unified Checks (Lint, Test, Validate) / All Checks Passed
      • any of: [🛡 GitHub branch protection]
        • check-neutral = Validate PR Template / validate-pr-template
        • check-skipped = Validate PR Template / validate-pr-template
        • check-success = Validate PR Template / validate-pr-template
All conditions
  • -closed [📌 queue requirement]
  • any of [🔀 queue conditions]:
    • all of [📌 queue conditions of queue rule Merge queue]:
      • any of [🛡 GitHub branch protection]:
        • check-neutral = CI • Unified Checks (Lint, Test, Validate) / All Checks Passed
        • check-skipped = CI • Unified Checks (Lint, Test, Validate) / All Checks Passed
        • check-success = CI • Unified Checks (Lint, Test, Validate) / All Checks Passed
      • any of [🛡 GitHub branch protection]:
        • check-neutral = Validate PR Template / validate-pr-template
        • check-skipped = Validate PR Template / validate-pr-template
        • check-success = Validate PR Template / validate-pr-template
    • all of [📌 queue conditions of queue rule dependabot]:
      • author~=^(dependabot\[bot\]|app/dependabot)$
      • label=area:dependencies
      • any of [🛡 GitHub branch protection]:
        • check-neutral = CI • Unified Checks (Lint, Test, Validate) / All Checks Passed
        • check-skipped = CI • Unified Checks (Lint, Test, Validate) / All Checks Passed
        • check-success = CI • Unified Checks (Lint, Test, Validate) / All Checks Passed
      • any of [🛡 GitHub branch protection]:
        • check-neutral = Validate PR Template / validate-pr-template
        • check-skipped = Validate PR Template / validate-pr-template
        • check-success = Validate PR Template / validate-pr-template
      • -conflict
      • -draft
      • base=develop
  • -conflict [📌 queue requirement]
  • -draft [📌 queue requirement]
  • any of [📌 queue -> configuration change requirements]:
    • -mergify-configuration-changed
    • check-success = Configuration changed
  • any of [📌 queue requirement]:
    • check-success = Mergify Merge Protections
    • check-neutral = Mergify Merge Protections
    • check-skipped = Mergify Merge Protections

- Replace invalid `approve:` action with `review: type: APPROVE`
- Remove invalid `allow_checks_interruption` queue option
- Add CHANGELOG entry for the dependabot auto-merge fix

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dm73CCVtnGNofnRNiVqkKw
@github-actions github-actions Bot added status:needs-review Awaiting code review type:bug Bug or defect priority:normal Default priority area:ci Build and CI pipelines type:chore Chore / small hygiene change meta:needs-changelog Requires a changelog entry before merge labels Jun 19, 2026
@github-actions github-actions Bot removed the type:chore Chore / small hygiene change label Jun 19, 2026
@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Metadata governance

@github-actions github-actions Bot added area:documentation Docs & guides lang:md Markdown content/docs labels Jun 19, 2026
@ashleyshaw ashleyshaw merged commit 2b93aed into develop Jun 19, 2026
30 checks passed
@ashleyshaw ashleyshaw deleted the fix/dependabot-auto-merge branch June 19, 2026 12:33
@ashleyshaw ashleyshaw mentioned this pull request Jun 19, 2026
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci Build and CI pipelines area:documentation Docs & guides lang:md Markdown content/docs meta:needs-changelog Requires a changelog entry before merge priority:normal Default priority status:needs-review Awaiting code review type:bug Bug or defect

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants