ci: run workflows on merge_group events - #378
Open
coretl wants to merge 1 commit into
Open
Conversation
Add merge_group to the generated CI workflow's on: triggers so projects built from this template get merge-queue-ready CI. Without this, a GitHub merge queue would stall forever waiting on checks that never start on its gh-readonly-queue/* refs. The 4 pre-existing test failures (docs / sphinx switcher.json fetch) are a sandbox network restriction unrelated to this change; no snapshot test compares generated CI workflow content. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y9bkocE5cCMw4LC72sJFHm
Contributor
Author
|
@ZohebShaikh is this the only change that blueapi had to make to use merge queues? |
ZohebShaikh
approved these changes
Sep 2, 2026
ZohebShaikh
left a comment
Contributor
There was a problem hiding this comment.
Yes, that's it. This was only needed for our PR Conventional Commit Validation, which isn't in the copier template by default.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Adds
merge_group:to theon:trigger list in the generated CI workflow:template/{% if git_platform=="github.com" %}.github{% endif %}/workflows/ci.yml.jinja. A single-line addition, nothing else — the template repo's own.github/workflows/ci.yml(which tests the template itself) is untouched, out of scope for this change.Why
No merge queue is enabled by default on projects generated from this template, but if one were turned on, GitHub only runs a workflow against
gh-readonly-queue/*refs when that workflow explicitly subscribes to themerge_groupevent. Neitherpushnorpull_requestcovers it, so a queued PR would sit there indefinitely waiting on checks that never start. This change makes generated projects' CI queue-ready ahead of time.What this PR is not
This PR does not enable a merge queue for any project. Turning one on is a repo-admin ruleset / branch-protection setting outside a workflow file's control — that decision stays with whoever administers each downstream repo. Until it's flipped on, this change is a safe no-op:
merge_groupevents simply never fire.Confirmed safe under
merge_groupmerge_groupthe ref isgh-readonly-queue/main/pr-N-<sha>, which isref_type == 'branch', nottag.main-gated docs-deploy job stays off for the same reason (ref_nameundermerge_groupisn'tmain).So no release or deploy can fire from a merge-queue run in any generated project.
Test suite
Ran
uv run --locked tox -e testsbefore pushing. 4 pre-existing failures remain (docs/Sphinx trying to fetchswitcher.jsonfromdiamondlightsource.github.io), all caused by this sandbox's outbound network restrictions — reproducible on a clean checkout with no changes, unrelated to this PR.pre-commitandtype-checkingpass. No test snapshots or asserts on the generated CI workflow's content, so nothing needed updating for this change.Downstream repos
This is the durable upstream fix.
bluesky/blueskyandbluesky/ophyd-asynccarry the identicalmerge_group:addition directly (both currently generated from this template) until they next re-run copier and pick it up from here:🤖 Generated with Claude Code
Generated by Claude Code