Skip to content

Commit 2513060

Browse files
committed
pushing
1 parent fe781d3 commit 2513060

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/claude-code-review.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Claude Code Review
22

33
on:
4-
pull_request:
4+
pull_request_target: # Use pull_request_target instead of pull_request
55
types: [opened, synchronize] # Runs on new PRs and updates
66

77
jobs:
@@ -21,17 +21,19 @@ jobs:
2121
uses: actions/checkout@v4
2222
with:
2323
fetch-depth: 0 # Fetch full history for accurate diffs
24+
# Important: For pull_request_target, ref needs to be explicitly set to PR head
25+
ref: ${{ github.event.pull_request.head.sha }}
2426

2527
- name: Run Code Review with Claude
2628
id: code-review
2729
uses: anthropics/claude-code-action@beta
2830
with:
29-
# Your GitHub token for API operations
30-
github_token: ${{ secrets.GITHUB_TOKEN }}
31-
3231
# Define the review focus areas
3332
direct_prompt: "Review the PR changes. Focus on code quality, potential bugs, and performance issues. Suggest improvements where appropriate. Pay special attention to Kubernetes operator patterns and Go best practices according to the CLAUDE.md file."
3433

34+
# Your GitHub token for API operations
35+
github_token: ${{ secrets.GITHUB_TOKEN }}
36+
3537
# Limited tools for safer review operations
3638
allowed_tools: |-
3739
# Git inspection commands (read-only)

0 commit comments

Comments
 (0)