anthropics / anthropics/claude-code-action

Issues with PR Review comments when upgrading from @beta to @v1

Offen
#567 4 Kommentare 3 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area:permissions bug p1
Vorherrschende Sprache
TypeScript
Sterne
8.9k
Forks
2.1k
Ø Merge
3 T. 9 Std.
Gemergte PRs (30 T.)
10

Beschreibung

**Describe the bug**
After upgrading `claude-code-action` from `@beta` to `@v1` and following the essential changes recommended [here](https://docs.anthropic.com/en/docs/claude-code/github-actions#essential-changes) comments were no longer populating on our PRs.

Reverting the change and using `@beta` resolves the problem

**To Reproduce**
Steps to reproduce the behavior:

1. Update from beta to v1
2. Update `direct_prompt` to `prompt`
3. See that GHA gets kicked off successfully
4. Note that no comment appears

**Expected behavior**
After upgrading a comment should appear on the PR when the GHA is run

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Workflow yml file**
```
name: Claude Auto Review
on:
pull_request:
types: [labeled]
jobs:
claude-review:
runs-on: ubuntu-latest
if: github.event.label.name == 'claude-review'
permissions:
contents: read
pull-requests: write # Needed to post review comments
id-token: write
steps:
# 1. Checkout repository to allow diff inspection
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch full history to enable proper diff analysis
# 2. Filter only relevant files (e.g., Poodle frontend files)
- name: Filter files
id: filter
uses: dorny/paths-filter@v3
with:
filters: |
poodle:
- 'cmd/poodle/**/*.js'
- 'cmd/poodle/**/*.jsx'
- 'cmd/poodle/**/*.ts'
- 'cmd/poodle/**/*.tsx'
# 3. Run Claude review if relevant files were changed
- name: Claude AI Review
if: steps.filter.outputs.poodle == 'true'
uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ANTHROPIC_API_KEY }}
github_token: ${{GITHUB_TOKEN }}
prompt: |
Post a simple comment that says "this is a comment"

claude_args: |
--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)"
```

**API Provider**

[ ] Anthropic First-Party API (default)
[ ] AWS Bedrock
[ ] GCP Vertex

**Additional context**
Upgrading to @v1.0.6 did not resolve the issue

Image This error appears when inspecting the GHA summary

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.