|
33 | 33 | description: "Issue number to triage" |
34 | 34 | required: true |
35 | 35 | type: string |
36 | | - # TEST ONLY: run the split workflow on push to the test branch so it can be |
37 | | - # exercised without opening an issue. Falls back to issue 2827 (see prep step). |
| 36 | + # TEST ONLY: run the split workflow on PRs so it can be exercised from a |
| 37 | + # branch (a pull_request run uses the workflow file as it exists on the PR |
| 38 | + # branch, and claude-code-action natively supports pull_request — unlike |
| 39 | + # push). No issue context, so it falls back to issue 2827 (see prep step). |
38 | 40 | # Remove this trigger before merging. |
39 | | - push: |
40 | | - branches: |
41 | | - - 06/15/26/triage_issue_wf |
| 41 | + pull_request: |
| 42 | + types: [opened, synchronize, reopened] |
42 | 43 |
|
43 | 44 | # Least privilege by default; each job narrows or widens this as needed. |
44 | 45 | permissions: |
|
52 | 53 | if: >- |
53 | 54 | github.event_name == 'workflow_dispatch' || |
54 | 55 | github.event_name == 'issues' || |
55 | | - github.event_name == 'push' || |
| 56 | + github.event_name == 'pull_request' || |
56 | 57 | (github.event_name == 'issue_comment' && |
57 | 58 | github.event.issue.pull_request == null && |
58 | 59 | startsWith(github.event.comment.body, '/triage') && |
|
66 | 67 | permissions: |
67 | 68 | contents: read |
68 | 69 | issues: read |
| 70 | + # TEST ONLY: claude-code-action reads PR context on pull_request events. |
| 71 | + # Read-only; remove with the pull_request trigger before merging. |
| 72 | + pull-requests: read |
69 | 73 | concurrency: |
70 | 74 | group: claude-issue-triage-${{ github.repository }}-${{ github.event.inputs.issue_number || github.event.issue.number }} |
71 | 75 | cancel-in-progress: true |
|
93 | 97 | # issue that triggered the event (opened issue or commented issue). |
94 | 98 | ISSUE="${INPUT_ISSUE:-}" |
95 | 99 | [ -z "$ISSUE" ] && ISSUE="${EVENT_ISSUE:-}" |
96 | | - # TEST ONLY: the push trigger has no issue context, so fall back to a |
97 | | - # known issue to exercise the split workflow. Remove with the push |
98 | | - # trigger before merging. |
| 100 | + # TEST ONLY: the pull_request trigger has no issue context, so fall |
| 101 | + # back to a known issue to exercise the split workflow. Remove with the |
| 102 | + # pull_request trigger before merging. |
99 | 103 | [ -z "$ISSUE" ] && ISSUE="2827" |
100 | 104 | if [ -z "$ISSUE" ]; then |
101 | 105 | echo "::error::no issue number — pass issue_number or trigger on issues/issue_comment" |
@@ -138,8 +142,8 @@ jobs: |
138 | 142 | # commands, or exfiltrate anything. It cannot edit repo files or post |
139 | 143 | # comments — the separate `comment` job does that deterministically. |
140 | 144 | claude_args: | |
141 | | - --allowedTools "Read,Glob,Grep,Write,Task" |
142 | | - --disallowedTools "Edit,MultiEdit,NotebookEdit,WebFetch,WebSearch,Bash" |
| 145 | + --allowedTools "Read,Glob,Grep,Write" |
| 146 | + --disallowedTools "Edit,MultiEdit,NotebookEdit,WebFetch,WebSearch,Bash,Task" |
143 | 147 | --max-turns 40 |
144 | 148 | prompt: | |
145 | 149 | REPO: ${{ github.repository }} |
|
0 commit comments