diff --git a/.github/workflows/claude-review-fork.yml b/.github/workflows/claude-review-fork.yml index d5254841..31f42277 100644 --- a/.github/workflows/claude-review-fork.yml +++ b/.github/workflows/claude-review-fork.yml @@ -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.