Skip to content

Commit e06b60f

Browse files
authored
Merge pull request #4125 from github/henrymercer/merge-queue-sarif-upload-flake
Don't upload the ESLint SARIF from merge queue refs
2 parents 9fddc16 + d2fe508 commit e06b60f

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/pr-checks.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,12 @@ jobs:
6767

6868
- name: Upload sarif
6969
uses: ./upload-sarif
70-
if: matrix.os == 'ubuntu-latest' && matrix.node-version == 24
70+
# The merge queue deletes its `gh-readonly-queue` ref as soon as the queue entry resolves,
71+
# so uploading against it races with that deletion. Both the `merge_group` run and the
72+
# paired `push` run that the queue branch creates use that ref, so gate on the ref itself
73+
# rather than the event. The same results are uploaded by the `pull_request` run and again
74+
# by the `push` run on `main`.
75+
if: matrix.os == 'ubuntu-latest' && matrix.node-version == 24 && !startsWith(github.ref, 'refs/heads/gh-readonly-queue/')
7176
with:
7277
sarif_file: eslint.sarif
7378
category: eslint

0 commit comments

Comments
 (0)