File tree Expand file tree Collapse file tree 1 file changed +63
-0
lines changed
Expand file tree Collapse file tree 1 file changed +63
-0
lines changed Original file line number Diff line number Diff line change 1+ name : " Claude React on comment"
2+
3+ on :
4+ issue_comment :
5+ types : [created]
6+ pull_request_review :
7+ types : [submitted]
8+ pull_request_review_comment :
9+ types : [created]
10+
11+ permissions :
12+ contents : write
13+ pull-requests : write
14+ issues : write
15+ actions : read
16+
17+ concurrency :
18+ group : claude-pr-reactions-${{ github.event.pull_request.number || github.event.issue.number }}
19+ cancel-in-progress : false
20+
21+ jobs :
22+ check-trigger :
23+ name : " Check trigger phrase"
24+ runs-on : ubuntu-latest
25+ timeout-minutes : 1
26+ outputs :
27+ triggered : ${{ steps.check.outputs.triggered }}
28+ steps :
29+ - name : " Check for trigger phrase"
30+ id : check
31+ env :
32+ COMMENT_BODY : ${{ github.event.comment.body || github.event.review.body || '' }}
33+ run : |
34+ if echo "$COMMENT_BODY" | grep -qF "@phpstan-bot"; then
35+ echo "triggered=true" >> "$GITHUB_OUTPUT"
36+ else
37+ echo "triggered=false" >> "$GITHUB_OUTPUT"
38+ fi
39+
40+ react :
41+ name : " React on comment"
42+ needs : check-trigger
43+ if : needs.check-trigger.outputs.triggered == 'true'
44+ runs-on : ubuntu-latest
45+ timeout-minutes : 60
46+
47+ steps :
48+ - name : " Checkout"
49+ uses : actions/checkout@v4
50+ with :
51+ token : ${{ secrets.PHPSTAN_BOT_TOKEN }}
52+
53+ - name : " React to feedback"
54+ uses : anthropics/claude-code-action@v1
55+ with :
56+ claude_code_oauth_token : ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
57+ github_token : ${{ secrets.PHPSTAN_BOT_TOKEN }}
58+ trigger_phrase : " @phpstan-bot"
59+ claude_args : " --model claude-opus-4-6"
60+ bot_name : " phpstan-bot"
61+ bot_id : " 79867460"
62+ additional_permissions : |
63+ actions: read
You can’t perform that action at this time.
0 commit comments