fix(ci): pin Claude review checkout to PR head sha

Prevents `git fetch origin pull/<N>/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.
This commit is contained in:
Jason
2026-05-02 20:23:18 +08:00
parent 8e59a634fd
commit ddc7b4567e

View File

@@ -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