|
5 | 5 | types: [created] |
6 | 6 | pull_request_review_comment: |
7 | 7 | types: [created] |
8 | | - issues: |
9 | | - types: [opened, assigned] |
10 | 8 | pull_request_review: |
11 | 9 | types: [submitted] |
| 10 | + issues: |
| 11 | + types: [opened, assigned] |
12 | 12 |
|
13 | 13 | jobs: |
14 | 14 | claude-code: |
| 15 | + # Run when: |
| 16 | + # - PR review comments mention @claude |
| 17 | + # - Issue comments mention @claude |
| 18 | + # - PR reviews mention @claude |
| 19 | + # - New issues are assigned to claude |
15 | 20 | if: | |
16 | 21 | (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) || |
17 | 22 | (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) || |
18 | | - (github.event_name == 'issues' && (github.event.action == 'opened' || github.event.action == 'assigned') && contains(github.event.issue.body, '@claude')) || |
19 | | - (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) |
| 23 | + (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) || |
| 24 | + (github.event_name == 'issues' && github.event.action == 'assigned' && github.event.assignee.login == 'claude') |
20 | 25 | runs-on: ubuntu-latest |
21 | 26 | permissions: |
22 | | - contents: read |
23 | | - issues: write |
| 27 | + contents: write |
24 | 28 | pull-requests: write |
| 29 | + issues: write |
| 30 | + id-token: write |
25 | 31 | steps: |
26 | 32 | - name: Checkout repository |
27 | 33 | uses: actions/checkout@v4 |
28 | 34 | with: |
29 | 35 | fetch-depth: 0 |
30 | 36 |
|
31 | 37 | - name: Run Claude Code |
32 | | - uses: anthropics/claude-code-action@beta |
| 38 | + uses: anthropics/claude-code-action@v1 |
33 | 39 | with: |
34 | 40 | anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} |
| 41 | + # Optional: Use a custom trigger phrase (default is @claude) |
| 42 | + # trigger_phrase: "@claude" |
| 43 | + # Optional: Specify allowed tools |
| 44 | + # allowed_tools: "Bash,Read,Write,Edit,Glob,Grep" |
| 45 | + # Optional: Add custom instructions |
| 46 | + # custom_instructions: "Follow the project's coding conventions in CLAUDE.md" |
0 commit comments