Skip to content

Commit e48c3f0

Browse files
committed
fix: permission
1 parent aa9ab69 commit e48c3f0

File tree

1 file changed

+15
-24
lines changed

1 file changed

+15
-24
lines changed

.github/workflows/claude.yml

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,42 @@
1-
name: Claude Code
1+
name: Claude Code Review
22

33
on:
44
issue_comment:
55
types: [created]
66
pull_request_review_comment:
77
types: [created]
8-
issues:
9-
types: [opened, assigned]
10-
pull_request_review:
11-
types: [submitted]
128
pull_request:
139
types: [opened, synchronize]
1410

1511
jobs:
1612
claude:
13+
# Auto-review on PR open/sync, or respond to @claude mentions
1714
if: |
1815
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
1916
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
20-
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
21-
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) ||
2217
(github.event_name == 'pull_request')
2318
runs-on: ubuntu-latest
2419
permissions:
25-
contents: read
20+
contents: write
2621
pull-requests: write
2722
issues: write
2823
id-token: write
29-
actions: read
3024
steps:
3125
- name: Checkout repository
32-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
33-
with:
34-
fetch-depth: 1
26+
uses: actions/checkout@v4
3527

36-
- name: Run Claude Code
37-
id: claude
38-
uses: anthropics/claude-code-action@ac1a3207f3f00b4a37e2f3a6f0935733c7c64651 # v1.0
28+
- name: Run Claude Code Review
29+
uses: anthropics/claude-code-action@v1
3930
with:
4031
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
41-
42-
# Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
4332
prompt: |
4433
Review this PR following the guidelines in CLAUDE.md.
45-
Focus on code quality, security, and adherence to project standards.
46-
Be concise and actionable in your feedback - highlight critical issues first.
47-
48-
# Optional: Add claude_args to customize behavior and configuration
49-
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
50-
# or https://docs.claude.com/en/docs/claude-code/cli-reference for available options
51-
# claude_args: '--allowed-tools Bash(gh pr:*)'
34+
Focus on:
35+
- Code quality and maintainability
36+
- Security issues
37+
- TypeScript strict mode compliance (NO `any` types)
38+
- Next.js App Router best practices
39+
- Server vs Client Component usage
40+
- hey-api integration patterns
41+
Be concise and actionable - highlight critical issues first.
42+
claude_args: "--max-turns 5"

0 commit comments

Comments
 (0)