Skip to content

Commit d45dcb1

Browse files
kevnm67claude
andauthored
Add Claude GitHub workflow for AI-assisted issue and PR handling (#179)
This workflow enables Claude to: - Answer questions about the codebase - Implement code changes from issues and PRs - Review pull requests and suggest improvements - Handle bug fixes, refactoring, and new features Triggered by @claude mentions in issues and PRs, or when labeled/assigned. Requires ANTHROPIC_API_KEY to be set in repository secrets. Co-authored-by: Claude <noreply@anthropic.com>
1 parent 6271522 commit d45dcb1

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

.github/workflows/claude.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Claude AI Assistant
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
pull_request_review_comment:
7+
types: [created]
8+
issues:
9+
types: [opened, labeled, assigned]
10+
pull_request:
11+
types: [opened, labeled, assigned]
12+
13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
issues: write
17+
18+
jobs:
19+
claude:
20+
runs-on: ubuntu-latest
21+
if: |
22+
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
23+
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
24+
(github.event_name == 'issues' && (github.event.action == 'labeled' || github.event.action == 'assigned')) ||
25+
(github.event_name == 'pull_request' && (github.event.action == 'labeled' || github.event.action == 'assigned'))
26+
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 0
32+
33+
- name: Run Claude
34+
uses: anthropics/claude-code-action@v1
35+
with:
36+
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
37+
github_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)