-
Notifications
You must be signed in to change notification settings - Fork 5
70 lines (63 loc) · 2.29 KB
/
claude-code.yml
File metadata and controls
70 lines (63 loc) · 2.29 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Claude Code Integration
on:
issue_comment:
types: [created]
jobs:
process-pr-review:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'issue_comment' && github.event.issue.pull_request && startsWith(github.event.comment.body, 'claude:') }}
permissions:
contents: read
pull-requests: write
issues: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get PR details
id: pr
run: |
PR_NUMBER="${{ github.event.issue.number }}"
FEEDBACK="${{ github.event.comment.body }}"
# Remove the "claude:" prefix
FEEDBACK="${FEEDBACK#claude:}"
echo "number=$PR_NUMBER" >> $GITHUB_OUTPUT
echo "feedback=$FEEDBACK" >> $GITHUB_OUTPUT
- name: Process with Claude Code
uses: fractureinc/claude-code-github-action@v0.2.0
with:
mode: 'review'
pr-number: ${{ steps.pr.outputs.number }}
feedback: ${{ steps.pr.outputs.feedback }}
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
github-token: ${{ secrets.GITHUB_TOKEN }}
process-pr-suggestions:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'issue_comment' && github.event.issue.pull_request && startsWith(github.event.comment.body, 'claude-suggest:') }}
permissions:
contents: read
pull-requests: write
issues: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get PR details
id: pr
run: |
PR_NUMBER="${{ github.event.issue.number }}"
FEEDBACK="${{ github.event.comment.body }}"
# Remove the "claude-suggest:" prefix
FEEDBACK="${FEEDBACK#claude-suggest:}"
echo "number=$PR_NUMBER" >> $GITHUB_OUTPUT
echo "feedback=$FEEDBACK" >> $GITHUB_OUTPUT
- name: Process with Claude Code Suggestions
uses: fractureinc/claude-code-github-action@v0.2.0
with:
mode: 'suggest'
pr-number: ${{ steps.pr.outputs.number }}
feedback: ${{ steps.pr.outputs.feedback }}
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
github-token: ${{ secrets.GITHUB_TOKEN }}