Skip to content

ci(workflows): Closing inactive issues#2559

Merged
wwwy3y3 merged 1 commit into
mainfrom
ci/cleanup-issues
Jul 21, 2026
Merged

ci(workflows): Closing inactive issues#2559
wwwy3y3 merged 1 commit into
mainfrom
ci/cleanup-issues

Conversation

@j-nguyenn

@j-nguyenn j-nguyenn commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

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:

  • Label an issue "stale" after 30 days with no activity
    (days-before-issue-stale: 30)
  • Close a stale issue after a further 14 days of inactivity
    (days-before-issue-close: 14)
  • Post an explanatory comment on both staling and closing, so authors
    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

  • actionlint .github/workflows/cleanup-issues.yml
  • This workflow only triggers on schedule (no workflow_dispatch entry
    point), so functional verification is available after merge, on the next
    01:30 UTC run.
  • After the first scheduled run, confirm behavior via:
    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

  • Chores
    • Added automated maintenance for inactive GitHub issues.
    • Issues are marked stale after 30 days of inactivity and closed 14 days later if no further activity occurs.
    • Pull requests are excluded from this automated cleanup.

@github-actions github-actions Bot added the ci label Jul 21, 2026
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: fd9ab925-3825-4f1d-ab34-5c906eae0bf2

📥 Commits

Reviewing files that changed from the base of the PR and between 3d1be24 and 5b67ce6.

📒 Files selected for processing (1)
  • .github/workflows/cleanup-issues.yml

Walkthrough

Adds 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.

Changes

Issue cleanup automation

Layer / File(s) Summary
Scheduled issue cleanup workflow
.github/workflows/cleanup-issues.yml
Adds daily scheduling, issue and pull-request write permissions, and actions/stale@v10 configuration for issue-only stale and close handling.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Suggested labels: ci

Poem

I’m a rabbit who watches the queue,
Stale issues get a gentle “shoo!”
Each day the workflow hops in time,
Closing the quiet, past-prime line.
Pull requests sleep untouched and bright—
Automation nibbles through the night.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: a workflow to close inactive issues.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/cleanup-issues

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.yml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@wwwy3y3
wwwy3y3 merged commit 13fb142 into main Jul 21, 2026
4 checks passed
@wwwy3y3
wwwy3y3 deleted the ci/cleanup-issues branch July 21, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants