Skip to content

mergify: automate queueing#872

Merged
mprpic merged 1 commit intomainfrom
kdreyer/mergify-autoqueue
Mar 10, 2026
Merged

mergify: automate queueing#872
mprpic merged 1 commit intomainfrom
kdreyer/mergify-autoqueue

Conversation

@ktdreyer
Copy link
Copy Markdown
Contributor

@ktdreyer ktdreyer commented Mar 10, 2026

From https://docs.mergify.com/merge-queue/rules/#autoqueueing-pull-requests the default value is false.

Possibly related: #868

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 10, 2026

Claude Code Review

Summary

This PR adds autoqueue: true to the Mergify default queue rule, enabling automatic queuing of PRs as soon as all configured CI checks pass. The change is a single focused line in .mergify.yml. However, there is an important behavioral implication: autoqueue: true queues PRs based solely on queue_conditions, which currently only includes CI check-successes — not a human approval. This effectively decouples automatic merging from the approval gate defined in pull_request_rules.

Issues by Severity

Blocker Issues

None

Critical Issues

None

Major Issues

Approval gate bypassed by autoqueue: true

  • File: .mergify.yml:3

  • Problem: With autoqueue: true, Mergify automatically adds any PR to the merge queue as soon as the four queue_conditions (CI checks) pass, regardless of review approval. The existing pull_request_rules "enqueue on approval" rule (which requires at least 1 approved review and 0 change requests) is now redundant for the purpose of gating merges. A PR with zero approvals, as long as CI is green, will be automatically queued and squash-merged.

  • Standard violated: Project governance expectation that PRs require at least one human review before merge (implicit in the existing pull_request_rules).

  • Suggested fix: Add approval conditions to queue_conditions to preserve the human review gate:

    queue_conditions:
      - check-success=End-to-End Tests
      - check-success=amber-review
      - check-success=validate-manifests
      - check-success=test-local-dev-simulation
      - "#approved-reviews-by>=1"
      - "#changes-requested-reviews-by=0"

    Or, if the intent is to fully automate merging without human approval (e.g. for bot PRs), document that explicitly and consider scoping autoqueue to specific PR authors via an additional condition.

Minor Issues

Redundant pull_request_rules entry

  • File: .mergify.yml:11-18
  • Problem: The "enqueue on approval" pull_request_rules action now has no practical effect because autoqueue: true already queues PRs when queue_conditions are met, without needing a reviewer to manually trigger queueing.
  • Suggestion: If the approval gate is intentionally dropped, remove or update the pull_request_rules block to avoid a misleading config. If the gate should be retained, move the approval conditions into queue_conditions (see Major fix above) and remove the now-dead rule.

Positive Highlights

  • The change is minimal and surgical — exactly one line with clear intent.
  • All existing automated safety checks (E2E Tests, amber-review, validate-manifests, test-local-dev-simulation) are preserved as queue conditions, so CI cannot be bypassed.
  • The PR description helpfully links to Mergify docs and references the related PR (mergify not merging approved PRs #868), providing good traceability.

Recommendations

  1. (High priority) Decide whether human approval should remain a merge gate. If yes, add the approval conditions to queue_conditions before merging this PR.
  2. (Low priority) Remove the now-redundant pull_request_rules "enqueue on approval" block to keep the Mergify config intentional and free of dead entries.

Review performed by Amber / Claude Code against repository standards in .claude/context/ and .claude/patterns/.


🔍 View AI decision process (logs available for 90 days)

📋 View memory system files loaded (click to expand)

What Amber Loaded for Code Review

Amber automatically loaded these repository standards from the memory system:

  1. CLAUDE.md - Master project instructions, development standards
  2. backend-development.md - Go backend, K8s integration patterns
  3. frontend-development.md - NextJS, Shadcn UI, React Query patterns
  4. security-standards.md - Auth, RBAC, token handling
  5. k8s-client-usage.md - User token vs service account patterns
  6. error-handling.md - Consistent error patterns
  7. react-query-usage.md - Data fetching patterns

Impact: This review used your repository's specific code quality standards, security patterns, and best practices from the memory system (PRs #359, #360) - not just generic code review guidelines.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 10, 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: 08978a91-33a8-4f06-a593-0de9e3dd7b99

📥 Commits

Reviewing files that changed from the base of the PR and between 167f011 and bbc7d45.

📒 Files selected for processing (1)
  • .mergify.yml

Walkthrough

Enabled automatic queuing in Mergify by adding autoqueue: true, introducing two queue_conditions (#approved-reviews-by>=1, #changes-requested-reviews-by=0), and removing the previous pull_request_rules block that enqueued on approval.

Changes

Cohort / File(s) Summary
Mergify Configuration
.mergify.yml
Added autoqueue: true to queue_rules.default, added two queue_conditions (#approved-reviews-by>=1, #changes-requested-reviews-by=0), and removed the prior pull_request_rules block that enqueued on approval.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'mergify: automate queueing' directly and clearly describes the main change: enabling autoqueue in the Mergify configuration.
Description check ✅ Passed The description references the Mergify documentation about autoqueueing and mentions a related issue, providing context for why this change was made.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch kdreyer/mergify-autoqueue

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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.mergify.yml:
- Line 3: The current Mergify rule uses autoqueue: true which enqueues PRs as
soon as queue_conditions match, bypassing the existing "enqueue on approval"
queue action; to fix, remove autoqueue: true or move the review predicates (the
approval-based conditions used in the separate "enqueue on approval" rule) into
the rule's queue_conditions so the same approval checks are evaluated before
enqueuing, and then delete the now-redundant explicit queue action; update the
affected rule blocks referencing autoqueue, queue_conditions, and queue (the
"enqueue on approval" rule) so that approval checks live under queue_conditions
and autoqueue is disabled or omitted.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 919121b1-c253-413f-bd0c-a735f42ce4d5

📥 Commits

Reviewing files that changed from the base of the PR and between 5d96404 and 167f011.

📒 Files selected for processing (1)
  • .mergify.yml

@ktdreyer ktdreyer force-pushed the kdreyer/mergify-autoqueue branch from 1e91a08 to bbc7d45 Compare March 10, 2026 19:36
@ktdreyer ktdreyer requested a review from mprpic March 10, 2026 19:39
@mprpic mprpic merged commit 42f7927 into main Mar 10, 2026
7 of 8 checks passed
@mprpic mprpic deleted the kdreyer/mergify-autoqueue branch March 10, 2026 19:44
@ambient-code ambient-code deleted a comment from mergify bot Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants