ci(workflows): Closing inactive issues#2559
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughAdds a daily GitHub Actions workflow that marks inactive issues stale after 30 days and closes them 14 days later, while excluding pull requests from stale automation. ChangesIssue cleanup automation
Estimated code review effort: 1 (Trivial) | ~3 minutes Suggested labels: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Checkov (3.3.8).github/workflows/cleanup-issues.ymlTraceback (most recent call last): Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Why
Issues opened against the repo can sit indefinitely with no activity once the
original reporter stops responding or the underlying question resolves
itself elsewhere. Left alone, these accumulate in the tracker, adding noise
that makes it harder to see which open issues still need triage or action,
and to gauge real backlog size.
There was previously no automated hygiene pass for issues: nothing labeled
them as inactive, and nothing closed them out once they'd been inactive long
enough. Cleanup was manual and did not happen consistently.
What
Add cleanup-issues.yml, running on a daily schedule (cron: "30 1 * * *"),
using actions/stale@v10 to:
(days-before-issue-stale: 30)
(days-before-issue-close: 14)
understand why and can reopen/comment to reset the clock
Pull requests are explicitly excluded from this pass
(days-before-pr-stale: -1, days-before-pr-close: -1) — PR staleness is a
separate concern with different risk (PRs can represent live, reviewable
work) and isn't addressed by this workflow.
Permissions are scoped to what actions/stale needs for issue operations:
issues: write (labeling/closing/commenting) and pull-requests: write
(required by the action even though PR staling is disabled here, since it
still reads PR state as part of its run).
Verification
point), so functional verification is available after merge, on the next
01:30 UTC run.
gh issue list --repo Canner/WrenAI --label stale
and check that issues inactive for 30+ days receive the stale label and
comment as expected, with no pull requests affected.
Summary by CodeRabbit