From 35e6670cdc397c8ca91d9294e0fc92f90c3b4f54 Mon Sep 17 00:00:00 2001 From: Ashish Patel Date: Sat, 25 Jul 2026 13:38:19 +0530 Subject: [PATCH] ci: auto-manage stale pull requests and issues (#155) The PR queue reached 53 open, with the oldest sitting untouched for eight months. None of that was caused by bad submissions - nothing ever closed anything, so contributors got no answer and the queue stopped being reviewable. 60 days to stale, 21 more to close. Deliberately generous: contributors here are volunteers adding a row to a catalog, and the goal is to close what is genuinely abandoned rather than to rush anyone. Any activity removes the label, so a contributor can rescue their own PR without needing me. operations-per-run is capped at 30 with ascending order so the first run works through the oldest items in batches instead of mass-closing the backlog in one pass. Anything labelled pinned, security, in progress or awaiting-maintainer is exempt. Signed-off-by: ashishpatel26 <3095771+ashishpatel26@users.noreply.github.com> Co-authored-by: ashishpatel26 <3095771+ashishpatel26@users.noreply.github.com> --- .github/workflows/stale.yml | 66 +++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..248f663 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,66 @@ +name: Stale + +on: + schedule: + - cron: '0 3 * * 1' # Mondays, 03:00 UTC + workflow_dispatch: + +permissions: + issues: write + pull-requests: write + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + # Deliberately generous. Contributors here are volunteers adding a row + # to a catalog, not staff. The goal is to close what has genuinely been + # abandoned, not to rush anyone. + days-before-stale: 60 + days-before-close: 21 + + stale-pr-message: > + This PR has had no activity for 60 days, so I'm marking it stale. + + + If you're still interested, just push a commit or leave a comment and + I'll take the label off. Rebasing onto current `main` is usually all + it needs — this README changes often and older branches stop merging + cleanly. + + + If I don't hear anything in 21 days it'll close automatically. That's + not a rejection and you can reopen it any time. + + close-pr-message: > + Closing this after 81 days without activity. + + + No hard feelings and nothing personal — I'd rather keep the queue + honest than leave PRs sitting open indefinitely with no answer. + Reopen it whenever you like, or open a fresh one against current + `main`. + + stale-issue-message: > + This issue has had no activity for 60 days, so I'm marking it stale. + Comment if it's still relevant and I'll keep it open. + + close-issue-message: > + Closing after 81 days without activity. Reopen if it's still an issue. + + stale-pr-label: stale + stale-issue-label: stale + + # Anything I've explicitly triaged is never auto-closed. + exempt-pr-labels: 'pinned,security,in progress,awaiting-maintainer' + exempt-issue-labels: 'pinned,security,in progress,awaiting-maintainer' + + # Removing the label on new activity is the point - it lets a + # contributor rescue their own PR without needing me. + remove-stale-when-updated: true + + # Small batches so a first run cannot mass-close the backlog. + operations-per-run: 30 + ascending: true