-
Notifications
You must be signed in to change notification settings - Fork 56
41 lines (38 loc) · 1.42 KB
/
Copy pathclaude.yml
File metadata and controls
41 lines (38 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Claude Code Review
# Triggers:
# - pull_request opened/synchronize/reopened -> automatic first-pass review
# - issue_comment / pull_request_review_comment containing @claude -> on-demand answer
on:
pull_request:
types: [opened, synchronize, reopened]
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
permissions:
contents: read
pull-requests: write
issues: write
jobs:
claude:
# Skip Dependabot PRs (dep bumps rarely benefit from LLM review and burn API budget).
# Skip fork PRs (GITHUB_TOKEN can't write to forks, so the action would run and silently fail).
# For comment events, skip ones authored by bots to avoid reply-loops with other integrations.
if: >-
!(github.event_name == 'pull_request' && (
github.event.pull_request.user.login == 'dependabot[bot]' ||
github.event.pull_request.head.repo.fork == true
)) &&
!(github.event.comment != null && endsWith(github.event.comment.user.login, '[bot]'))
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
trigger_phrase: '@claude'
# Pin to Opus 4.6; drop --max-turns lower if budget gets tight.
claude_args: --model claude-opus-4-6 --max-turns 5