Repository navigation
ci(queue): a dispatch on main reports Queue on a PR's head - #7619
Merged
Merged
Conversation
A dispatch reads queue.yml from the ref it runs on, so dispatching on an old PR branch is refused. A dispatch on main now takes the PR head's SHA and creates the skipped Queue check run there with the workflow's own token (the GitHub Actions app the ruleset pins), with only checks: write and no checkout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
This run was cancelled before it finished. |
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.

Problem
mainrequires theQueuecontext. PRs whose test merge commit predatesqueue.ymlnever get apull_requestrun that reports it, so GitHub keeps them out of the merge queue. That's 68 PRs that were armed for the retired host gate. moq-dev/moq#7617's dispatch can't help them: a dispatch reads the workflow from the ref it runs on, and their old branches have no dispatch trigger, so every dispatch was refused with HTTP 422.Approach
The dispatch now runs on
mainwith ashainput. AReport Queuejob creates the skippedQueuecheck run on that commit through the Checks API. It uses the workflow's own token, which belongs to the GitHub Actions app the ruleset pins (15368). The job holds onlychecks: write, checks nothing out, and validates the input as a full SHA. This only satisfies the PR-side requirement, as apull_requestrun's skipped job already does for every PR. The merge queue still builds each group on the self-hosted runner.sh/gh/queue.test.tsasserts the input, the condition, the permissions and the single step.Impact
Alternatives
maininto each branch: that moves reviewed heads and fails on conflicting ones.Follow-ups
gh workflow run queue.yml -f sha=<head>for each armed PR missingQueue.Review
quest review --base origin/main),gpt-6-astraat medium effort, session01a19b3e-33a0-76d1-8025-f6811c11e7ef.3a6d9be77ba28f1be7dc4a57b399b5d98ecd1f43: no findings.just gh checkpasses.(Written by Claude Opus 5.5)
🤖 Generated with Claude Code