From d2fe508a6d480a4c90dd74cacbb40cf0812b4e5a Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Fri, 4 Sep 2026 17:22:52 +0100 Subject: [PATCH] Don't upload the ESLint SARIF from merge queue refs Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/pr-checks.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index b1e1314251..3915fddf53 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -67,7 +67,12 @@ jobs: - name: Upload sarif uses: ./upload-sarif - if: matrix.os == 'ubuntu-latest' && matrix.node-version == 24 + # The merge queue deletes its `gh-readonly-queue` ref as soon as the queue entry resolves, + # so uploading against it races with that deletion. Both the `merge_group` run and the + # paired `push` run that the queue branch creates use that ref, so gate on the ref itself + # rather than the event. The same results are uploaded by the `pull_request` run and again + # by the `push` run on `main`. + if: matrix.os == 'ubuntu-latest' && matrix.node-version == 24 && !startsWith(github.ref, 'refs/heads/gh-readonly-queue/') with: sarif_file: eslint.sarif category: eslint