From aafb522b783582e5c0d72fa2ff9fcd52287594ca Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Tue, 12 Nov 2024 23:18:40 -0800 Subject: [PATCH] ci: Fix status reporting on PRs (#7574) To report commit status on a PR, the head commit must be used, not the merge of that head back into the target (e.g. into main). I would prefer to make status reporting special, so that we can run tests and other operations against the merge (for more realistic results and to avoid test failures that only show up after a merge). But this is the quickest way for me to fix this critical feedback. --- .github/workflows/selenium-lab-tests.yaml | 2 +- .github/workflows/update-screenshots.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/selenium-lab-tests.yaml b/.github/workflows/selenium-lab-tests.yaml index b090b3a3ce..56bf6d9b3e 100644 --- a/.github/workflows/selenium-lab-tests.yaml +++ b/.github/workflows/selenium-lab-tests.yaml @@ -68,7 +68,7 @@ jobs: # If "sha" is given, it overrides PR. If neither is given, we fall # back to testing "main". sha: ${{ inputs.sha }} - ref: ${{ inputs.pr && format('refs/pull/{0}/merge', inputs.pr) || 'refs/heads/main' }} + ref: ${{ inputs.pr && format('refs/pull/{0}/head', inputs.pr) || 'refs/heads/main' }} # Configure the build matrix based on our grid's YAML config. # The matrix contents will be computed by this first job and deserialized diff --git a/.github/workflows/update-screenshots.yaml b/.github/workflows/update-screenshots.yaml index 8fbb204894..28848ad991 100644 --- a/.github/workflows/update-screenshots.yaml +++ b/.github/workflows/update-screenshots.yaml @@ -23,7 +23,7 @@ jobs: id: compute uses: shaka-project/shaka-github-tools/compute-sha@main with: - ref: refs/pull/${{ inputs.pr }}/merge + ref: refs/pull/${{ inputs.pr }}/head set-pending-status: name: Set Pending Status