mirror of
https://github.com/coleam00/Archon.git
synced 2025-12-24 02:39:17 -05:00
Fix Claude checkout issue for forked PRs
- Add environment overrides to prevent PR branch checkout - Add explicit github_token for authentication - Add direct_prompt to guide Claude to use diff file - Override GITHUB_REF and GITHUB_SHA to stay on base branch
This commit is contained in:
12
.github/workflows/claude-review-fork.yml
vendored
12
.github/workflows/claude-review-fork.yml
vendored
@@ -142,12 +142,24 @@ jobs:
|
||||
id: claude
|
||||
uses: anthropics/claude-code-action@beta
|
||||
timeout-minutes: 15
|
||||
env:
|
||||
# Override to prevent checkout of PR branch
|
||||
GITHUB_REF: refs/heads/${{ github.event.repository.default_branch }}
|
||||
GITHUB_SHA: ${{ github.event.pull_request.base.sha || github.sha }}
|
||||
with:
|
||||
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
||||
|
||||
# Explicitly provide GitHub token
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# Trigger phrase for manual reviews
|
||||
trigger_phrase: "@claude-review-fork"
|
||||
|
||||
# Tell Claude to analyze the diff file instead of checking out code
|
||||
direct_prompt: |
|
||||
IMPORTANT: Analyze the pr-diff.patch file that has already been created in the current directory.
|
||||
Do NOT attempt to checkout any code. The diff file contains all the changes you need to review.
|
||||
|
||||
# Custom instructions for fork review
|
||||
custom_instructions: |
|
||||
You are performing a CODE REVIEW ONLY for a PULL REQUEST FROM A FORK. You cannot make any changes to files.
|
||||
|
||||
Reference in New Issue
Block a user