diff --git a/.mergify.yml b/.mergify.yml index fb38ab9..eb98c4c 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -6,9 +6,17 @@ # Spec: docs/ci/mergify-integration-spec.md + docs/ci/mergify.yml.proposed # (issues #407 / #408). # Schema: https://docs.mergify.com/configuration/file-format/ -# Verified against the LIVE Mergify docs on 2026-07-06 (queue rules, -# the queue action, priority rules, parallel checks, batches, setup and -# lifecycle pages) — the config format evolves, so this is not from memory. +# Verified against the LIVE Mergify docs on 2026-07-07 (file-format, queue +# rules, priority, merge-queue lifecycle/setup/batches, and the +# merge-protections auto-merge pages) — the config format evolves, so this is +# not from memory. +# 2026-07-07 CHANGE: auto-queueing migrated OFF the `pull_request_rules` +# queue-action path (which no longer auto-queues — a green matching PR just +# reported "Merge queue is ready — use `@Mergifyio queue`" and sat there) ONTO +# `merge_protections_settings.auto_merge_conditions` (see that block below). +# The old `autoqueue`/queue-action auto path is DEPRECATED and "will stop +# working on 2026-07-16" (docs.mergify.com/merge-queue/rules). This changes only +# the TRIGGER; the queue's merge semantics (below) are untouched. # ============================================================================ # # WHAT THIS DOES @@ -125,22 +133,39 @@ priority_rules: priority: 1000 # --------------------------------------------------------------------------- -# pull_request_rules — WHICH PRs enter the queue. -# The `queue` action is what actually ADDS a PR to the merge queue: per -# docs.mergify.com/merge-queue/lifecycle, queue_conditions alone do NOT auto-queue a PR — -# a queue action (or an `@mergifyio queue` command / auto_merge) is required, otherwise the -# "Mergify Merge Queue" check sits permanently pending. A PR is queued as soon as it is green -# on "CI passed", targets `main`, is not a draft, has no conflicts, and is not flagged -# `broken`. `broken` / `draft` PRs are never queued. +# merge_protections_settings — WHICH PRs are AUTOMATICALLY added to the queue. +# +# This REPLACES the old `pull_request_rules` `queue` action. That action no longer +# auto-queues in current Mergify: a green, matching PR just reported "Merge queue is +# ready — use `@Mergifyio queue`" and sat there forever (never merged). Automatic +# queueing now lives in `auto_merge_conditions` under `merge_protections_settings`. The +# old `queue_rules[].autoqueue` field (and the queue-action auto path) is DEPRECATED and +# "will stop working on 2026-07-16. Use `auto_merge_conditions` in +# `merge_protections_settings` instead" (docs.mergify.com/merge-queue/rules). +# +# `auto_merge_conditions` accepts `true` (auto-queue every mergeable PR) or, as here, +# "a list of conditions to restrict the audience" (docs.mergify.com/configuration/ +# file-format). We give the SAME set the old queue action used, so EXACTLY the same PRs +# auto-queue: green on "CI passed", targeting `main`, not a draft, no conflicts, not +# `broken`. +# +# WHY THIS PRESERVES require-up-to-date: this changes only the TRIGGER (manual → +# automatic). It does NOT touch how the queue validates or merges — batch_size 1, +# merge_method merge, and max_parallel_checks 1 above are unchanged — and those are the +# settings that interact with require-up-to-date (only BATCHING, batch_size > 1, forces +# that checkbox OFF; see the invariants header + docs.mergify.com/merge-queue/batches). +# When a merge queue is configured, a matched PR is auto-QUEUED, not merged directly: +# "Every PR is auto-queued. The merge queue then handles routing and merging" +# (docs.mergify.com/merge-protections/auto-merge) — so it still goes through the serial +# queue, gets updated onto the latest `main`, re-runs CI, and merges on the real green +# "CI passed". Mergify also auto-reads GitHub branch protection (the required "CI passed" +# check + require-up-to-date) and injects it as a merge condition, so the GitHub gate is +# enforced on top of queue_rules.merge_conditions. # --------------------------------------------------------------------------- -pull_request_rules: - - name: Queue green, non-draft, non-conflicting PRs targeting main - conditions: - - base = main - - -draft - - -conflict - - label != broken - - check-success = CI passed - actions: - queue: - name: default +merge_protections_settings: + auto_merge_conditions: + - base = main + - -draft + - -conflict + - label != broken + - check-success = CI passed