Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/workflows/claude-code-review.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Claude Code Review

on:
pull_request:
pull_request_target: # Use pull_request_target instead of pull_request
types: [opened, synchronize] # Runs on new PRs and updates

jobs:
Expand All @@ -14,25 +14,26 @@ jobs:
discussions: write
id-token: write
statuses: write
workflow: write
actions: write
steps:
# Check out the code to allow git diff operations
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch full history for accurate diffs
# Important: For pull_request_target, ref needs to be explicitly set to PR head
ref: ${{ github.event.pull_request.head.sha }}

- name: Run Code Review with Claude
id: code-review
uses: anthropics/claude-code-action@beta
with:
# Your GitHub token for API operations
github_token: ${{ secrets.GITHUB_TOKEN }}

# Define the review focus areas
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."

# Your GitHub token for API operations
github_token: ${{ secrets.GITHUB_TOKEN }}

# Limited tools for safer review operations
allowed_tools: |-
# Git inspection commands (read-only)
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/claude-comment-response.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
discussions: write
id-token: write
statuses: write
workflow: write
actions: write
steps:
- name: Checkout code
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/claude-pr-creation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
discussions: write
id-token: write
statuses: write
workflow: write
actions: write
steps:
- name: Checkout code
Expand Down