Skip to content

Commit ac08b38

Browse files
authored
ci: add Claude bot (#432)
Add Claude bot to this project.
1 parent 326ccdb commit ac08b38

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

.github/workflows/claude.yaml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Claude
2+
on:
3+
issues:
4+
types:
5+
- opened
6+
- assigned
7+
issue_comment:
8+
types:
9+
- created
10+
pull_request:
11+
paths:
12+
- .github/workflows/claude.yaml
13+
pull_request_review:
14+
types:
15+
- submitted
16+
pull_request_review_comment:
17+
types:
18+
- created
19+
concurrency:
20+
group: ${{ github.workflow }}-${{ github.event.issue.number || github.event.pull_request.number || github.run_id }}
21+
cancel-in-progress: false
22+
jobs:
23+
default:
24+
if: |
25+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
26+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
27+
(github.event_name == 'issues' && contains(github.event.issue.body, '@claude')) ||
28+
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
29+
github.event_name == 'pull_request'
30+
runs-on: ubuntu-latest
31+
timeout-minutes: 5
32+
permissions:
33+
contents: read
34+
pull-requests: write
35+
issues: write
36+
id-token: write
37+
steps:
38+
- uses: actions/checkout@v5
39+
with:
40+
fetch-depth: 1
41+
- uses: aws-actions/configure-aws-credentials@v5
42+
with:
43+
role-to-assume: arn:aws:iam::440849847947:role/claude-code-gha
44+
role-session-name: gha-claude-code-action
45+
aws-region: us-east-2
46+
- id: generate-token
47+
uses: actions/create-github-app-token@v2
48+
with:
49+
app-id: 1129585
50+
private-key: ${{ secrets.POSIT_CONNECT_PROJECTS_PEM }}
51+
- uses: anthropics/claude-code-action@v1
52+
with:
53+
use_bedrock: true
54+
github_token: ${{ steps.generate-token.outputs.token }}
55+
branch_prefix: claude-
56+
additional_permissions: "actions: read"
57+
track_progress: true
58+
prompt: |
59+
You are a helpful AI assistant for code reviews and issue triage.
60+
Respond to comments and issues that mention you with relevant code suggestions or triage actions.
61+
If you cannot assist, politely inform the user. In your responses, don't be overly complimentary.
62+
Stick to the facts and provide actionable advice.
63+
claude_args: |
64+
--model us.anthropic.claude-sonnet-4-5-20250929-v1:0
65+
--fallback-model us.anthropic.claude-haiku-4-5-20251001-v1:0
66+
--allowedTools mcp__github__create_pull_request,mcp__github__create_issue,mcp__github__search_issues,mcp__github__update_issue,mcp__github__create_pending_pull_request_review,mcp__github__add_pull_request_review_comment_to_pending_review,mcp__github__submit_pending_pull_request_review,mcp__github__get_pull_request_diff

0 commit comments

Comments
 (0)