Skip to content

Commit 971a8e7

Browse files
benceruleanluchristian-byrne
authored andcommitted
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: #5866 (review) 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.
1 parent 706ef10 commit 971a8e7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/claude-pr-review.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ jobs:
5353
uses: actions/checkout@v5
5454
with:
5555
fetch-depth: 0
56+
ref: refs/pull/${{ github.event.pull_request.number }}/head
5657

5758
- name: Install pnpm
5859
uses: pnpm/action-setup@v4
@@ -86,4 +87,4 @@ jobs:
8687
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8788
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
8889
BASE_SHA: ${{ github.event.pull_request.base.sha }}
89-
REPOSITORY: ${{ github.repository }}
90+
REPOSITORY: ${{ github.repository }}

0 commit comments

Comments
 (0)