1
+ name : Claude Code
2
+
3
+ on :
4
+ issue_comment :
5
+ types : [created]
6
+ pull_request_review_comment :
7
+ types : [created]
8
+ issues :
9
+ types : [opened, assigned]
10
+ pull_request_review :
11
+ types : [submitted]
12
+
13
+ env :
14
+ ANTHROPIC_BASE_URL : ${{ secrets.ANTHROPIC_BASE_URL }}
15
+
16
+ jobs :
17
+ claude :
18
+ if : |
19
+ (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
20
+ (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
21
+ (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
22
+ (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
23
+ runs-on : ubuntu-latest
24
+ permissions :
25
+ contents : write
26
+ pull-requests : write
27
+ issues : write
28
+ id-token : write
29
+ actions : read # Required for Claude to read CI results on PRs
30
+ steps :
31
+ - name : Checkout repository
32
+ uses : actions/checkout@v4
33
+ with :
34
+ fetch-depth : 1
35
+
36
+ - name : Run Claude Code
37
+ id : claude
38
+ uses : anthropics/claude-code-action@beta
39
+ with :
40
+ anthropic_api_key : ${{ secrets.ANTHROPIC_API_KEY }}
41
+ mode : experimental-review
42
+ model : kimi-k2
43
+
44
+ # This is an optional setting that allows Claude to read CI results on PRs
45
+ additional_permissions : |
46
+ actions: read
47
+
48
+ # Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4.1)
49
+ # model: "claude-opus-4-1-20250805"
50
+
51
+ # Optional: Customize the trigger phrase (default: @claude)
52
+ # trigger_phrase: "/claude"
53
+
54
+ # Optional: Trigger when specific user is assigned to an issue
55
+ # assignee_trigger: "claude-bot"
56
+
57
+ # Optional: Allow Claude to run specific commands
58
+ # allowed_tools: "Bash(npm install),Bash(npm run build),Bash(npm run test:*),Bash(npm run lint:*)"
59
+
60
+ # Optional: Add custom instructions for Claude to customize its behavior for your project
61
+ # custom_instructions: |
62
+ # Follow our coding standards
63
+ # Ensure all new code has tests
64
+ # Use TypeScript for new files
65
+
66
+ # Optional: Custom environment variables for Claude
67
+ # claude_env: |
68
+ # NODE_ENV: test
0 commit comments