anthropics / anthropics/claude-code-action

experimental-review does not have access to CLAUDE_COMMENT_ID

Abierto
#465 2 comentarios 0 reacciones 0 asignados Ver en GitHub
bug experimental-review mcp p3
Lenguaje dominante
TypeScript
Estrellas
8.9k
Forks
2.1k
Merge medio
3 d 9 h
PR fusionados (30 d)
10

Descripción

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 or
- 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.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.