Skip to content

Commit bcb3fe2

Browse files
ThomasK33claude
andauthored
ci: auto-label new issues with needs-triage (#287)
## Summary Adds a GitHub Actions workflow that automatically applies the `needs-triage` label to every newly opened issue, so untriaged issues are easy to find and filter. ## How it works - Triggers on `issues: opened` (the `issues` event does **not** fire for pull requests, so PRs are unaffected). - Runs with the minimal `issues: write` permission using the built-in `GITHUB_TOKEN` — no secrets to configure. - Applies the label with a single `gh issue edit` call. The issue number is passed via an `env:` var rather than interpolated into the `run:` script (avoids template-injection; zizmor-clean). The `needs-triage` label itself was created once out-of-band, so the workflow only *applies* it rather than recreating it on every run. If the label is ever deleted, the next run fails loudly (surfacing the misconfiguration) instead of silently masking it. ## Notes - The repo already uses a `triage:` namespace (`triage:done`). This PR uses `needs-triage` as requested; if you'd prefer namespace consistency, `triage:needs` would pair naturally — happy to rename. ## Test plan - [ ] Open a throwaway issue and confirm `needs-triage` is applied automatically within a few seconds. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Thomas Kosiewski <tk@coder.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent e6c9dd4 commit bcb3fe2

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Issue Triage
2+
3+
on:
4+
issues:
5+
types:
6+
- opened
7+
8+
permissions:
9+
issues: write
10+
11+
jobs:
12+
add-needs-triage:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Add needs-triage label
16+
env:
17+
GH_TOKEN: ${{ github.token }}
18+
GH_REPO: ${{ github.repository }}
19+
ISSUE_NUMBER: ${{ github.event.issue.number }}
20+
run: gh issue edit "$ISSUE_NUMBER" --add-label "needs-triage"

0 commit comments

Comments
 (0)