ci: add stale issue and PR cleanup workflow - #216
Conversation
|
This is a clean implementation — it matches every bullet in #35 line for line, the Before merging I want to widen one thing, and it's a gap in my original issue rather than anything you got wrong. I checked what the first run would actually do to the current backlog: 7 of our 11 open issues would be marked stale immediately and closed 14 days later — and five of those are labeled Could you add to both exempt lists: exempt-issue-labels: pinned,security,good first issue,help wanted
exempt-pr-labels: pinned,security,good first issue,help wantedOne other thing that was on my side: With that one change this is good to merge. |
The suite only triggered on `pull_request` into `prod`, so every contributor PR targeting `main` merged with no automated verification — tests ran later, at release time, when main was promoted to prod. #215, #216 and #218 all sat mergeable with an empty status-check rollup. Add `main` to the trigger and gate the jobs: PRs into prod always run (that is the release gate, unchanged), PRs into main run only for outside contributions. Our own work — Rome-1's PRs, or any branch living in the Raftersecurity repo — is reviewed and tested locally before it is pushed, so re-running the full matrix would only burn runner minutes. Uses `pull_request`, not `pull_request_target`: fork PRs run with a read-only token and no secrets. Tests that need RAFTER_API_KEY already skip when it is absent, so a fork PR gets a clean green rather than a spurious failure.
Summary
Closes #35.
This PR adds
.github/workflows/stale.ymlusingactions/stale@v9to help manage inactive issues and pull requests.What changed
staleafter 60 days of inactivity.staleafter 30 days of inactivity.pinnedorsecurityare exempt.stalelabel is removed when new activity occurs.workflow_dispatchso maintainers can run the workflow manually.Test plan
.github/workflows/stale.yml.git diff --check.npx -y prettier --check .github/workflows/stale.yml.actions/stale@v9.days-before-pr-close: -1.pinnedandsecuritylabels are exempt.