From d1edaffbe5f29903554c1c10795cbaaa9a9137e1 Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Thu, 22 Oct 2026 18:05:53 +0000 Subject: [PATCH] Render the semantic diff with the workflow's own scripts A pull request's run takes the workflow from its merge into master but checked out the renderer from the branch, so a branch made before #8958 passed --markdown to a commitRecords.js that took it for a revision. The renderer now comes from the merge as well. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AzPS5F8RDSGZ6dhfK6NdZp Signed-off-by: Christoph Knittel --- .github/workflows/semantic_diff.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/semantic_diff.yml b/.github/workflows/semantic_diff.yml index 1629a5ced8..33cb31b9d6 100644 --- a/.github/workflows/semantic_diff.yml +++ b/.github/workflows/semantic_diff.yml @@ -7,10 +7,13 @@ name: Semantic Diff # when the pull request is opened or reopened or its branch is force-pushed. # # A pull request from a branch of this repository runs on pull_request, with -# its own workflow and renderer. A pull request from a fork runs on -# pull_request_target, which GitHub takes from the default branch and runs -# with the repository's secrets: it executes only the default branch's code, -# and the fork's commits are fetched as git data and never checked out. +# the workflow and renderer of its merge into the base branch: GitHub takes +# the workflow from that merge, so the renderer comes from it too, and a +# branch made before the workflow changed still gets matching scripts. A +# pull request from a fork runs on pull_request_target, which GitHub takes +# from the default branch and runs with the repository's secrets: it +# executes only the default branch's code, and the fork's commits are +# fetched as git data and never checked out. # # Pages are never deleted, so the links in the comments stay valid after a # pull request is merged or closed. @@ -46,7 +49,7 @@ jobs: - name: Checkout renderer uses: actions/checkout@v7 with: - ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.event.pull_request.base.sha }} + ref: ${{ github.event_name == 'pull_request' && github.sha || github.event.pull_request.base.sha }} fetch-depth: 0 filter: blob:none persist-credentials: false