Skip to content

Commit ec85baf

Browse files
cknittclaude
andauthored
Keep the semantic diff pages of all pull requests (#8957)
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. Claude-Session: https://claude.ai/code/session_01AzPS5F8RDSGZ6dhfK6NdZp Signed-off-by: Christoph Knittel <ck@cca.io> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 0326cb5 commit ec85baf

1 file changed

Lines changed: 5 additions & 29 deletions

File tree

‎.github/workflows/semantic_diff.yml‎

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,15 @@ name: Semantic Diff
1111
# pull_request_target, which GitHub takes from the default branch and runs
1212
# with the repository's secrets: it executes only the default branch's code,
1313
# and the fork's commits are fetched as git data and never checked out.
14+
#
15+
# Pages are never deleted, so the links in the comments stay valid after a
16+
# pull request is merged or closed.
1417

1518
on:
1619
pull_request:
17-
types: [opened, synchronize, reopened, closed]
20+
types: [opened, synchronize, reopened]
1821
pull_request_target:
19-
types: [opened, synchronize, reopened, closed]
22+
types: [opened, synchronize, reopened]
2023

2124
concurrency:
2225
group: semantic-diff-${{ github.event_name }}-${{ github.event.pull_request.number }}
@@ -25,7 +28,6 @@ concurrency:
2528
jobs:
2629
render:
2730
if: >-
28-
github.event.action != 'closed' &&
2931
github.actor != 'dependabot[bot]' &&
3032
(github.event_name == 'pull_request') ==
3133
(github.event.pull_request.head.repo.full_name == github.repository)
@@ -97,29 +99,3 @@ jobs:
9799
comment-tag: semantic-diff-${{ steps.render.outputs.head }}
98100
mode: upsert
99101
file-path: semantic-diff/comment.md
100-
101-
cleanup:
102-
if: >-
103-
github.event.action == 'closed' &&
104-
github.actor != 'dependabot[bot]' &&
105-
(github.event_name == 'pull_request') ==
106-
(github.event.pull_request.head.repo.full_name == github.repository)
107-
runs-on: ubuntu-26.04
108-
permissions: {}
109-
steps:
110-
- name: Setup Rclone
111-
uses: cometkim/rclone-actions/setup-rclone@8d9c6b95341f7698609deee65c3d62af42893288 # main, 2025-06-18
112-
113-
- name: Configure Rclone remote
114-
uses: cometkim/rclone-actions/configure-remote/s3-provider@8d9c6b95341f7698609deee65c3d62af42893288 # main, 2025-06-18
115-
with:
116-
name: rescript
117-
provider: Cloudflare
118-
endpoint: https://${{ vars.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com
119-
access-key-id: ${{ secrets.CLOUDFLARE_R2_ACCESS_KEY_ID }}
120-
secret-access-key: ${{ secrets.CLOUDFLARE_R2_SECRET_ACCESS_KEY }}
121-
acl: private
122-
123-
- name: Delete semantic diff
124-
continue-on-error: true
125-
run: rclone purge --s3-no-check-bucket "rescript:cdn-assets/semantic-diff/pr-${{ github.event.pull_request.number }}"

0 commit comments

Comments
 (0)