From ddc7b4567e301e724747d6e3c156898a2befc047 Mon Sep 17 00:00:00 2001 From: Jason Date: Sat, 2 May 2026 20:23:18 +0800 Subject: [PATCH] fix(ci): pin Claude review checkout to PR head sha MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prevents `git fetch origin pull//head:main` failures on fork PRs whose head branch is also named `main` — using a SHA puts the runner in detached HEAD so the main ref is free for the action's internal fetch. --- .github/workflows/claude.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index fffbbd3b..40ebefb1 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -44,6 +44,7 @@ jobs: uses: actions/checkout@v6 with: fetch-depth: 1 + ref: ${{ github.event.pull_request.head.sha || github.sha }} - name: Run Claude (review only) uses: anthropics/claude-code-action@v1