mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-05-06 13:50:28 +08:00
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:
1
.github/workflows/claude.yml
vendored
1
.github/workflows/claude.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user