claude-code/scripts
Chris Lloyd edfb5437a4
Fix sweep script crashing on locked issues (#25649)
The sweep job (https://github.com/anthropics/claude-code/actions/runs/21983111029/job/63510453226)
was silently failing when closeExpired tried to comment on a locked issue,
causing a 403 from the GitHub API.

Two issues:

1. closeExpired didn't skip locked issues like markStale already does.
   Adding the same `if (issue.locked) continue` guard fixes this.

2. The error was swallowed by `main().catch(console.error)` which logs
   to stderr but exits 0, so CI reported success despite the crash.
   Replaced the main() wrapper with top-level await so unhandled errors
   properly crash the process with a non-zero exit code.

## Test plan

YOLO
2026-02-13 15:40:00 -08:00
..
auto-close-duplicates.ts Restore dedupe workflows 2025-09-24 18:01:05 -07:00
backfill-duplicate-comments.ts Restore dedupe workflows 2025-09-24 18:01:05 -07:00
comment-on-duplicates.sh fix: validate that issues exist before commenting on duplicates 2026-01-07 07:57:56 -08:00
sweep.ts Fix sweep script crashing on locked issues (#25649) 2026-02-13 15:40:00 -08:00