Skip to content

ci: run CI on merge_group so a merge queue can be enabled - #101

Merged
montycheese merged 1 commit into
mainfrom
ci/merge-queue-trigger
Aug 26, 2026
Merged

ci: run CI on merge_group so a merge queue can be enabled#101
montycheese merged 1 commit into
mainfrom
ci/merge-queue-trigger

Conversation

@montycheese

Copy link
Copy Markdown
Contributor

What

Adds the merge_group trigger to .github/workflows/ci.yml.

Why

A pull request in a GitHub merge queue is not tested on the PR branch. GitHub creates a temporary refs/heads/gh-readonly-queue/main/pr-N-<sha> ref containing the PR's commits on top of everything ahead of it in the queue, and dispatches the merge_group event against it. That ref fires neither pull_request nor push, so as things stand today CI would never start for a queued PR and the queue would sit waiting on required checks indefinitely.

This is the prerequisite change: it has to be on main before the queue is turned on, because the queue's required checks are looked up on the base branch's workflows.

Concurrency

No change needed. Merge group runs fall through to github.ref, which is unique per queue entry, so they never collide with each other or with the PR's own run. cancel-in-progress is already gated on github.event_name == 'pull_request', so a queued run is never cancelled — cancelling one would drop its PR out of the queue.

Not in this PR

Two follow-up steps are required before the queue actually works, and both are repo settings rather than code:

  1. Required checks. main's branch protection currently requires only Heimdall Review Status. The queue merges when the required checks pass on the merge group ref, so Heimdall Review Status needs to either report on merge_group events or be dropped from the required list, and the CI jobs (typecheck, lint, test, docs (generated agent index), public build excludes internal-only surfaces) should be added.
  2. Enable the queue under Settings → Branches → main → Require merge queue, and pick the merge method (the repo is squash-only) plus batch size and timeouts.

Testing

actionlint .github/workflows/ci.yml is clean. The change is trigger-only — no job, step, or permission is modified.

A pull request in a GitHub merge queue is tested on a temporary
refs/heads/gh-readonly-queue/... ref, which fires the merge_group event
and neither pull_request nor push. Without this trigger the queue would
sit waiting on required checks that never start.

The concurrency block already behaves correctly for merge groups: they
fall through to github.ref, which is unique per queue entry, and
cancel-in-progress stays false for anything that is not a pull_request,
so a queued run is never cancelled out from under the queue.
@cb-heimdall

cb-heimdall commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
omni-ui Ready Ready Preview Aug 26, 2026 5:25pm

Request Review

@montycheese
montycheese merged commit 7fe3829 into main Aug 26, 2026
12 checks passed
@montycheese
montycheese deleted the ci/merge-queue-trigger branch August 26, 2026 18:00
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.

3 participants