11name : Triage issue with Claude
22
3- # Triages a single GitHub issue with Claude. It runs when a new issue is opened,
4- # when a maintainer comments `/triage` on an issue, or when dispatched manually
5- # with an explicit issue number.
3+ # Triages a single GitHub issue with Claude. It runs when a maintainer comments
4+ # `/triage` on an issue, or when dispatched manually with an explicit issue
5+ # number. Triage is never run automatically on issue open, so untrusted users
6+ # cannot trigger model runs by opening issues.
67#
78# The triage method lives in a Claude "skill" committed to this repo at
89# `.cursor/skills/triage-issues/` (SKILL.md + references.md). The workflow checks
@@ -23,8 +24,6 @@ name: Triage issue with Claude
2324# cannot post a tampered comment on its own.
2425
2526on :
26- issues :
27- types : [opened]
2827 issue_comment :
2928 types : [created]
3029 workflow_dispatch :
3332 description : " Issue number to triage"
3433 required : true
3534 type : string
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).
40- # Remove this trigger before merging.
41- pull_request :
42- types : [opened, synchronize, reopened]
4335
4436# Least privilege by default; each job narrows or widens this as needed.
4537permissions :
@@ -48,12 +40,10 @@ permissions:
4840jobs :
4941 triage :
5042 name : Triage issue
51- # Triage on: a newly opened issue, a `/triage` command from a maintainer
52- # (not on pull requests), or a manual dispatch.
43+ # Triage only on an explicit `/triage` command from a maintainer (not on
44+ # pull requests) or a manual dispatch. Opening an issue does not trigger it .
5345 if : >-
5446 github.event_name == 'workflow_dispatch' ||
55- github.event_name == 'issues' ||
56- github.event_name == 'pull_request' ||
5747 (github.event_name == 'issue_comment' &&
5848 github.event.issue.pull_request == null &&
5949 startsWith(github.event.comment.body, '/triage') &&
6757 permissions :
6858 contents : read
6959 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
7360 concurrency :
7461 group : claude-issue-triage-${{ github.repository }}-${{ github.event.inputs.issue_number || github.event.issue.number }}
7562 cancel-in-progress : true
9784 # issue that triggered the event (opened issue or commented issue).
9885 ISSUE="${INPUT_ISSUE:-}"
9986 [ -z "$ISSUE" ] && ISSUE="${EVENT_ISSUE:-}"
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.
103- [ -z "$ISSUE" ] && ISSUE="2827"
10487 if [ -z "$ISSUE" ]; then
10588 echo "::error::no issue number — pass issue_number or trigger on issues/issue_comment"
10689 exit 1
@@ -196,7 +179,7 @@ jobs:
196179 # Hand the report to the privileged job via an artifact. Nothing with a
197180 # writable token has run up to this point.
198181 - name : Upload triage report
199- uses : actions/upload-artifact@v4
182+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
200183 with :
201184 name : triage-report
202185 path : triage/triage-report.md
@@ -215,7 +198,7 @@ jobs:
215198 issues : write
216199 steps :
217200 - name : Download triage report
218- uses : actions/download-artifact@v4
201+ uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
219202 with :
220203 name : triage-report
221204 path : triage
0 commit comments