Skip to content

👷 ci: add merge_group trigger ahead of enabling the merge queue - #202

Merged
cwest merged 1 commit into
mainfrom
topic/ci-merge-group
Jul 26, 2026
Merged

👷 ci: add merge_group trigger ahead of enabling the merge queue#202
cwest merged 1 commit into
mainfrom
topic/ci-merge-group

Conversation

@cwest

@cwest cwest commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

Why

The merge queue tests each queued PR on a temporary gh-readonly-queue/... ref and reports results against the merge_group event. A required check whose workflow doesn't listen for that event never reports — so the queue waits forever and every merge deadlocks.

build-and-test is the only required check here, so ci.yml is the one that matters.

This is intentionally inert

With the queue disabled, GitHub emits no merge_group events. No new runs, no change to existing push/pull_request behaviour.

That's the point — the trigger must be on main before the setting is flipped, never after. This PR is step 1 of 2.

Concurrency: checked, not assumed

ci.yml uses concurrency: ci-${{ github.ref }} with cancel-in-progress: true, which is exactly the shape that can sabotage a queue if runs share a group.

They don't. A queued run's github.ref is the unique per-PR readonly-queue ref (refs/heads/gh-readonly-queue/main/pr-N-<sha>), so each lands in its own concurrency group and cannot cancel a sibling. No change needed.

Not included

Enabling the queue is a repository setting and is left to you — I don't change repo settings without explicit approval.

Once this is on main, the ordering constraint is satisfied and the queue is safe to turn on.

Verified clean under zizmor with online audits enabled, and make lint-configs passes.

@cwest
cwest requested a review from a team as a code owner July 26, 2026 13:51
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.
@cwest
cwest force-pushed the topic/ci-merge-group branch from de621fc to 9d91294 Compare July 26, 2026 14:00
@cwest
cwest merged commit 26efc1b into main Jul 26, 2026
14 checks passed
@cwest
cwest deleted the topic/ci-merge-group branch July 26, 2026 14:10
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.

1 participant