From 630ef8391aaffb626af7b54c15a6b20743111075 Mon Sep 17 00:00:00 2001 From: Aaron Dewes Date: Fri, 24 Jan 2025 13:34:15 +0100 Subject: [PATCH 1/2] fix: Make lighthouse report actually work Previously, this workflow just checked out the main branch, which caused the report to be pretty useless. --- .github/workflows/lighthouse-report.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lighthouse-report.yml b/.github/workflows/lighthouse-report.yml index 3e94d93ec3b8..c0cd6f622f39 100644 --- a/.github/workflows/lighthouse-report.yml +++ b/.github/workflows/lighthouse-report.yml @@ -22,7 +22,11 @@ jobs: steps: - name: Checkout uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - + with: + # pull_request_target checks out the base branch by default + ref: ${{ steps.merge-commit.outputs.mergedSha }} + # Fetches the merge commit and its parents + fetch-depth: 2 - name: Use Node.js uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 with: From 1a6bca20f9ea0b7c16d59318d7346d181449860c Mon Sep 17 00:00:00 2001 From: Aaron Dewes Date: Sat, 25 Jan 2025 19:38:41 +0100 Subject: [PATCH 2/2] Update lighthouse-report.yml --- .github/workflows/lighthouse-report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lighthouse-report.yml b/.github/workflows/lighthouse-report.yml index c0cd6f622f39..715cb63f6c55 100644 --- a/.github/workflows/lighthouse-report.yml +++ b/.github/workflows/lighthouse-report.yml @@ -24,7 +24,7 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: # pull_request_target checks out the base branch by default - ref: ${{ steps.merge-commit.outputs.mergedSha }} + ref: "${{ github.event.pull_request.merge_commit_sha }}" # Fetches the merge commit and its parents fetch-depth: 2 - name: Use Node.js