From 259fee1c15c83d04739329625f82f4fb385308b5 Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Thu, 22 Oct 2026 09:46:11 +0000 Subject: [PATCH] Keep the semantic diff pages of all pull requests Closing a pull request, merged or not, deleted its page and broke the links in its comments. No page is deleted now: the cleanup job and the closed trigger are gone. 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 | 34 +++++------------------------ 1 file changed, 5 insertions(+), 29 deletions(-) diff --git a/.github/workflows/semantic_diff.yml b/.github/workflows/semantic_diff.yml index 152f241905..1629a5ced8 100644 --- a/.github/workflows/semantic_diff.yml +++ b/.github/workflows/semantic_diff.yml @@ -11,12 +11,15 @@ name: Semantic Diff # 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. on: pull_request: - types: [opened, synchronize, reopened, closed] + types: [opened, synchronize, reopened] pull_request_target: - types: [opened, synchronize, reopened, closed] + types: [opened, synchronize, reopened] concurrency: group: semantic-diff-${{ github.event_name }}-${{ github.event.pull_request.number }} @@ -25,7 +28,6 @@ concurrency: jobs: render: if: >- - github.event.action != 'closed' && github.actor != 'dependabot[bot]' && (github.event_name == 'pull_request') == (github.event.pull_request.head.repo.full_name == github.repository) @@ -97,29 +99,3 @@ jobs: comment-tag: semantic-diff-${{ steps.render.outputs.head }} mode: upsert file-path: semantic-diff/comment.md - - cleanup: - if: >- - github.event.action == 'closed' && - github.actor != 'dependabot[bot]' && - (github.event_name == 'pull_request') == - (github.event.pull_request.head.repo.full_name == github.repository) - runs-on: ubuntu-26.04 - permissions: {} - steps: - - name: Setup Rclone - uses: cometkim/rclone-actions/setup-rclone@8d9c6b95341f7698609deee65c3d62af42893288 # main, 2025-06-18 - - - name: Configure Rclone remote - uses: cometkim/rclone-actions/configure-remote/s3-provider@8d9c6b95341f7698609deee65c3d62af42893288 # main, 2025-06-18 - with: - name: rescript - provider: Cloudflare - endpoint: https://${{ vars.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com - access-key-id: ${{ secrets.CLOUDFLARE_R2_ACCESS_KEY_ID }} - secret-access-key: ${{ secrets.CLOUDFLARE_R2_SECRET_ACCESS_KEY }} - acl: private - - - name: Delete semantic diff - continue-on-error: true - run: rclone purge --s3-no-check-bucket "rescript:cdn-assets/semantic-diff/pr-${{ github.event.pull_request.number }}"