Extract triage prompt into /triage-issue command and use a dedicated
edit-issue-labels.sh script for label operations instead of raw
gh issue edit. The script validates labels against the repo's existing
labels before applying them.
The sweep script was closing issues based solely on when a lifecycle label
was applied, ignoring any human comments posted after the label. This caused
active issues (like #11792) to be closed even when users responded to the
stale warning.
Three changes:
1. Teach the triage bot about `stale` and `autoclose` labels so it removes
them when a human comments on the issue.
2. Add a safety net in `closeExpired()` that checks for non-bot comments
posted after the lifecycle label was applied — if any exist, skip closing.
3. Extend the 10-upvote protection (which previously only applied to
enhancements) to all issue types, in both `markStale()` and
`closeExpired()`.
Fixes#16497
## Test plan
Trace through scenarios manually:
- Issue with stale label + human comment after → triage removes label;
sweep skips even if triage hasn't run yet (safety net)
- Issue with stale label + no human comment → closes as before
- Issue with 10+ upvotes of any type → never marked stale or closed
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Unify issue lifecycle labeling and sweep into a single system
Consolidate issue triage, stale detection, and lifecycle enforcement into
two components: a Claude-powered triage workflow and a unified sweep script.
Triage workflow changes:
- Add issue_comment trigger so Claude can re-evaluate lifecycle labels when
someone responds to a needs-repro/needs-info issue
- Add concurrency group per issue with cancel-in-progress to avoid pile-up
- Filter out bot comments to prevent sweep/dedupe triggering re-triage
- Hardcode allowed label whitelist to prevent label sprawl (was discovering
labels via gh label list, leading to junk variants like 'needs repro' vs
'needs-repro')
- Replace MCP GitHub server with gh CLI — simpler, no Docker dependency,
chaining is caught by the action so permissions are equivalent
- Add lifecycle labels (needs-repro, needs-info) for bugs missing info
- Add invalid label for off-topic issues (Claude API, billing, etc.)
- Add anti-patterns to prevent false positives (don't require specific
format, model behavior issues don't need traditional repro, etc.)
Sweep script changes:
- Absorb stale issue detection (was separate stale-issue-manager workflow)
- Mark issues as stale after 14 days of inactivity
- Skip assigned issues (team is working on it internally)
- Skip enhancements with 10+ thumbs up (community wants it)
- Add invalid label with 3-day timeout
- Add autoclose label support to drain 200+ legacy issues
- Drop needs-votes (stale handles inactive enhancements)
- Unify close messages into a single template with per-label reasons
- Run 2x daily instead of once
Delete stale-issue-manager.yml — its logic is now in sweep.ts.
## Test plan
Dry-run sweep locally:
GITHUB_TOKEN=$(gh auth token) GITHUB_REPOSITORY_OWNER=anthropics GITHUB_REPOSITORY_NAME=claude-code bun run scripts/sweep.ts --dry-run
Triage workflow will be tested by opening a test issue after merge.
* Update .github/workflows/claude-issue-triage.yml
Co-authored-by: Ashwin Bhat <ashwin@anthropic.com>
---------
Co-authored-by: Ashwin Bhat <ashwin@anthropic.com>
Updates GitHub workflow files to use the new claude-code-action@v1 and replaces prompt_file with inline prompt parameter.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Generated-By: Claude Code (cli/claude-opus-4-5=100%)
Claude-Steers: 3
Claude-Permission-Prompts: 4
Claude-Escapes: 0
Update all Claude Code GitHub Action workflows to use the latest Sonnet 4.5 model (claude-sonnet-4-5-20250929) instead of the default Sonnet 4.0 model. This provides improved performance and capabilities for:
- Issue commenting and PR reviews (claude.yml)
- Automated issue triage (claude-issue-triage.yml)
- Duplicate issue detection (claude-dedupe-issues.yml)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Added a checkout step to the GitHub Actions workflow for issue triage
to ensure the repository is available during the triage process.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Claude <noreply@anthropic.com>