You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
types: [opened, synchronize] # Runs on new PRs and updates
6
+
7
+
jobs:
8
+
code-review:
9
+
runs-on: ubuntu-latest
10
+
steps:
11
+
# Check out the code to allow git diff operations
12
+
- name: Checkout code
13
+
uses: actions/checkout@v4
14
+
with:
15
+
fetch-depth: 0# Fetch full history for accurate diffs
16
+
17
+
- name: Run Code Review with Claude
18
+
id: code-review
19
+
uses: anthropics/claude-code-action@beta
20
+
with:
21
+
# Define the review focus areas
22
+
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."
23
+
24
+
# Limited tools for safer review operations
25
+
allowed_tools: [
26
+
# Git inspection commands (read-only)
27
+
"Bash(git status)",
28
+
"Bash(git log)",
29
+
"Bash(git diff --name-only HEAD~1)",
30
+
"Bash(git diff HEAD~1)",
31
+
"Bash(git show)",
32
+
"Bash(git blame)",
33
+
34
+
# File exploration tools
35
+
"View", # Read file contents
36
+
"GlobTool", # Find files by pattern
37
+
"GrepTool", # Search file contents
38
+
"BatchTool"# Run multiple tools in parallel
39
+
]
40
+
41
+
# Timeout after 15 minutes
42
+
timeout_minutes: 15
43
+
44
+
# Your Anthropic API key (stored as a GitHub secret)
0 commit comments