Don't upload the ESLint SARIF from merge queue refs - #4125
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused workflow change has no unresolved issues.
Review tier: Balanced
Findings: None
What changed in this PR
Prevents transient merge-queue failures by skipping ESLint SARIF uploads for ephemeral queue refs.
Changes:
- Adds a ref-based guard for
gh-readonly-queuerefs. - Documents coverage of merge-group and paired push runs.
| File | Description |
|---|---|
.github/workflows/pr-checks.yml |
Skips ESLint SARIF uploads from merge-queue refs. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
henrymercer
marked this pull request as ready for review
September 4, 2026 16:27
mbg
approved these changes
Sep 4, 2026
mbg
left a comment
Member
There was a problem hiding this comment.
Good observation. Thanks for noticing and fixing it! The fix looks sensible to me.
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.
The
Unit Testsjob uploads its ESLint SARIF viaupload-sarif, gated only on OS and Node version.PR Checksruns onmerge_group, and also onpushfor thegh-readonly-queuebranch that the merge queue creates, so in both cases the upload targets a ref that GitHub deletes as soon as the queue entry resolves. When the upload loses that race the code scanning API returns 404 and the step fails.This accounts for every merge queue failure of
PR Checksin the visible run history — five of them, going back to May.Gate the step on the ref rather than the event, since both the
merge_grouprun and the pairedpushrun use the ephemeral ref. Nothing is lost: alerts on a queue ref are never surfaced, and the same results are uploaded by thepull_requestrun and again by thepushrun onmain.codeql.ymlalready skips its uploads for merge queue runs. It only needs the event check because itspushtrigger is limited tomainandreleases/v*.Lint enforcement is unaffected —
lint-cistill fails the job on any lint error. Only the alert upload is skipped.