-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
bugSomething isn't workingSomething isn't workingexperimental-reviewmcpp3Minor bug or general feature requestMinor bug or general feature request
Description
Worflow file
name: Claude Code Review
on:
pull_request_review:
types: [submitted]
issue_comment:
types: [created]
pull_request:
types: [opened, ready_for_review]
jobs:
claude-review:
if: |
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '/review')) ||
(github.event_name == 'issue_comment' && github.event.issue.pull_request && contains(github.event.comment.body, '/review')) ||
(github.event_name == 'pull_request' && github.event.pull_request.draft == false)
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: write
pull-requests: write
issues: write
id-token: write
actions: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Run Claude Code Review
id: claude-review
uses: anthropics/claude-code-action@beta
with:
mode: experimental-review
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
additional_permissions: |
actions: read
trigger_phrase: "/review"
# this should not be required but somehow claude loses the context...
allowed_tools: "Edit,View,Replace,Write,Create,BatchTool,GlobTool,GrepTool,Bash(gh pr:*),Bash(gh issue comment:*),mcp__*,mcp__github_comment__update_claude_comment"
custom_instructions: |
CRITICAL ADDITIONAL INSTRUCTIONS:
- Adopt a concise writing style.
- Review the code independently of other comments in <comments /> or <review_comments />
- ONLY add inline comments to request or suggest changes
- DO NOT add inline comments to: highlight positives, show appreciation, say a change is good, acknowledge correct implementations, highlight good security practice, or anything that would NOT lead to the author making a change
- DO add inline comments to: suggest improvements, identify bugs, point out security issues, recommend refactoring, or flag potential problems
Logs:
Perfect! Now I have a complete understanding of the changes. Let me provide a comprehensive code review.
Token usage: 24907 input, 1 output
🔧 mcp__github_comment__update_claude_comment
Parameters:
{
"body": "# Code Review: ..."
}
❌ Error: Error: CLAUDE_COMMENT_ID environment variable is required
Token usage: 24907 input, 1 output
This is consistently happening.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingexperimental-reviewmcpp3Minor bug or general feature requestMinor bug or general feature request