1313 types : [review_requested]
1414
1515jobs :
16- debug :
17- runs-on : ubuntu-latest
18- steps :
19- - name : Debug
20- run : |
21- echo "github.event: ${{ fromJSON(github.event) }}"
2216 claude :
2317 if : |
2418 (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
2519 (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
2620 (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
2721 (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude'))) ||
28- (github.event_name == 'pull_request' && github.event.requested_user.name == 'pythonitaliabot2 ')
22+ (github.event_name == 'pull_request' && github.event.action == 'review_requested ')
2923 runs-on : ubuntu-latest
3024 timeout-minutes : 30
3125 permissions :
@@ -42,33 +36,14 @@ jobs:
4236
4337 - name : Run Claude
4438 uses : anthropics/claude-code-action@v1
45- if : ${{ github.event_name != 'pull_request' && github.event.requested_user.name != 'pythonitaliabot2' }}
4639 with :
47- anthropic_api_key : ${{ secrets.ANTHROPIC_API_KEY }}
48- # Optional: Customize the trigger phrase (default: @claude)
49- # trigger_phrase: "/claude"
40+ claude_code_oauth_token : ${{ secrets.CLAUDE_OAUTH_TOKEN }}
5041
51- # Optional: Trigger when specific user is assigned to an issue
42+ # Trigger when specific user is assigned to an issue
5243 assignee_trigger : " pythonitaliabot2"
5344
54- # Optional: Configure Claude's behavior with CLI arguments
55- # claude_args: |
56- # --model claude-opus-4-1-20250805
57- # --max-turns 10
58- # --allowedTools "Bash(npm install),Bash(npm run build),Bash(npm run test:*),Bash(npm run lint:*)"
59- # --system-prompt "Follow our coding standards. Ensure all new code has tests. Use TypeScript for new files."
60-
61- # Optional: Advanced settings configuration
62- # settings: |
63- # {
64- # "env": {
65- # "NODE_ENV": "test"
66- # }
67- # }
45+ # Trigger when specific user is requested as a reviewer on a PR
46+ reviewer_trigger : " pythonitbot2"
6847
69- - name : Run code-review
70- uses : anthropics/claude-code-action@v1
71- if : ${{ github.event_name == 'pull_request' && github.event.requested_user.name == 'pythonitaliabot2' }}
72- with :
73- anthropic_api_key : ${{ secrets.ANTHROPIC_API_KEY }}
74- prompt : " Review this PR"
48+ claude_args : |
49+ --model claude-opus-4-5-20251101
0 commit comments