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
31 changes: 18 additions & 13 deletions .github/workflows/claude-code-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
jobs:
code-review:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
# Check out the code to allow git diff operations
- name: Checkout code
Expand All @@ -18,25 +21,27 @@ jobs:
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
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."
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."

# Limited tools for safer review operations
allowed_tools: [
allowed_tools: |-
# Git inspection commands (read-only)
"Bash(git status)",
"Bash(git log)",
"Bash(git diff --name-only HEAD~1)",
"Bash(git diff HEAD~1)",
"Bash(git show)",
"Bash(git blame)",
Bash(git status)
Bash(git log)
Bash(git diff --name-only HEAD~1)
Bash(git diff HEAD~1)
Bash(git show)
Bash(git blame)

# File exploration tools
"View", # Read file contents
"GlobTool", # Find files by pattern
"GrepTool", # Search file contents
"BatchTool" # Run multiple tools in parallel
]
View # Read file contents
GlobTool # Find files by pattern
GrepTool # Search file contents
BatchTool # Run multiple tools in parallel

# Timeout after 15 minutes
timeout_minutes: 15
Expand Down
50 changes: 31 additions & 19 deletions .github/workflows/claude-comment-response.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,47 @@ jobs:
# Only run if the comment mentions @claude
if: contains(github.event.comment.body, '@claude')
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
issues: write
steps:
- uses: anthropics/claude-code-action@beta
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch full history for accurate diffs

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

# Pass the comment text as the prompt
prompt: "${{ github.event.comment.body }}"
direct_prompt: "${{ github.event.comment.body }}"

# Define which tools Claude can use
allowed_tools: [
allowed_tools: |-
# Git inspection commands (read-only)
"Bash(git status)",
"Bash(git log)",
"Bash(git show)",
"Bash(git blame)",
"Bash(git ls-files)",
"Bash(git branch)",
"Bash(git tag)",
"Bash(git diff)",
Bash(git status)
Bash(git log)
Bash(git show)
Bash(git blame)
Bash(git ls-files)
Bash(git branch)
Bash(git tag)
Bash(git diff)

# File modifications
"Bash(git add)",
"Bash(git commit)",
Bash(git add)
Bash(git commit)

# File exploration tools
"View", # Read file contents
"Edit", # Edit files
"GlobTool", # Find files by pattern
"GrepTool", # Search file contents
"BatchTool" # Run multiple tools in parallel
]
View # Read file contents
Edit # Edit files
GlobTool # Find files by pattern
GrepTool # Search file contents
BatchTool # Run multiple tools in parallel

# Maximum number of conversation turns
max_turns: 10
Expand Down
56 changes: 32 additions & 24 deletions .github/workflows/claude-pr-creation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,41 +18,49 @@ jobs:
pull-requests: write
issues: write
steps:
- uses: anthropics/claude-code-action@beta
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch full history for accurate diffs

- name: Claude PR Creation
uses: anthropics/claude-code-action@beta
with:
# Your GitHub token for API operations
github_token: ${{ secrets.GITHUB_TOKEN }}

# Pass the comment text as the prompt
prompt: "${{ github.event.comment.body }}"
direct_prompt: "${{ github.event.comment.body }}"

# Define which tools Claude can use
allowed_tools: [
allowed_tools: |-
# Git inspection commands
"Bash(git status)",
"Bash(git log)",
"Bash(git show)",
"Bash(git blame)",
"Bash(git reflog)",
"Bash(git stash list)",
"Bash(git ls-files)",
"Bash(git branch)",
"Bash(git tag)",
"Bash(git diff)",
Bash(git status)
Bash(git log)
Bash(git show)
Bash(git blame)
Bash(git reflog)
Bash(git stash list)
Bash(git ls-files)
Bash(git branch)
Bash(git tag)
Bash(git diff)

# Git modification commands
"Bash(git checkout -b)",
"Bash(git add)",
"Bash(git commit)",
"Bash(git push)",
Bash(git checkout -b)
Bash(git add)
Bash(git commit)
Bash(git push)

# GitHub CLI commands for PR creation
"Bash(gh pr create)",
Bash(gh pr create)

# File exploration and modification tools
"View", # Read file contents
"Edit", # Edit files
"GlobTool", # Find files by pattern
"GrepTool", # Search file contents
"BatchTool" # Run multiple tools in parallel
]
View # Read file contents
Edit # Edit files
GlobTool # Find files by pattern
GrepTool # Search file contents
BatchTool # Run multiple tools in parallel

# Maximum number of conversation turns
max_turns: 20
Expand Down
Loading