From 1efc2233c52393691959e8f35d773cfc8a8a5110 Mon Sep 17 00:00:00 2001 From: Benjamin Lu Date: Wed, 1 Oct 2025 12:52:03 -0700 Subject: [PATCH] Fix Claude review workflow checkout ref (#5874) By default, in this case the checkout action will checkout to github's temporary merge base ref, which may include changes from the base branch when the base branch moves. This happened in this review: https://github.com/Comfy-Org/ComfyUI_frontend/pull/5866#pullrequestreview-3287366541 To prevent this, the PR's HEAD SHA was specified to be used specifically, keeping claude's reviews only looking at that PR's branch. --- .github/workflows/claude-pr-review.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/claude-pr-review.yml b/.github/workflows/claude-pr-review.yml index cf5439590..b85b5c771 100644 --- a/.github/workflows/claude-pr-review.yml +++ b/.github/workflows/claude-pr-review.yml @@ -53,6 +53,7 @@ jobs: uses: actions/checkout@v5 with: fetch-depth: 0 + ref: refs/pull/${{ github.event.pull_request.number }}/head - name: Install pnpm uses: pnpm/action-setup@v4 @@ -86,4 +87,4 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} COMMIT_SHA: ${{ github.event.pull_request.head.sha }} BASE_SHA: ${{ github.event.pull_request.base.sha }} - REPOSITORY: ${{ github.repository }} \ No newline at end of file + REPOSITORY: ${{ github.repository }}