From 9d912947c509f65a725bd191343126d74f231322 Mon Sep 17 00:00:00 2001 From: Casey West Date: Sun, 26 Jul 2026 09:50:57 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20ci:=20add=20merge=5Fgroup=20trig?= =?UTF-8?q?ger=20ahead=20of=20enabling=20the=20merge=20queue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The merge queue tests each queued pull request on a temporary `gh-readonly-queue/...` ref and reports the result against the `merge_group` event. A required status check whose workflow does not listen for that event therefore never reports on a queued pull request, and the queue waits indefinitely -- enabling the queue before this trigger exists deadlocks every merge. `build-and-test` is the only required check in this repository, so it is the one that matters. This commit is inert on its own. With the queue disabled GitHub emits no merge_group events, so no new runs are produced and nothing about the current push and pull_request behaviour changes. That is the intended sequencing: the trigger has to be on main before the setting is flipped, never after. The existing concurrency group needed checking rather than assuming. It keys on `ci-${{ github.ref }}` with cancel-in-progress enabled, and a queued run's ref is the unique per-pull-request readonly-queue ref, so each queued run lands in its own concurrency group and cannot cancel a sibling. No change required. Enabling the queue itself is a repository setting and is deliberately left to a maintainer. --- .github/workflows/ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 39ac27b6..0ba4b5ed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,15 @@ on: branches: [main] pull_request: branches: [main] + # Required before the merge queue can be turned on. A queued pull request is + # tested on a temporary `gh-readonly-queue/...` ref, and GitHub reports the + # result against the `merge_group` event -- so a required check that does not + # listen for this event never reports, and every queued pull request waits + # forever. Adding the trigger is inert while the queue is disabled: no + # merge_group events are produced, so this changes nothing until the setting + # is flipped. That is deliberate -- it has to land first. + merge_group: + branches: [main] # Default to least privilege; individual jobs may grant more. permissions: