Skip to content

Add stale issue cleanup workflow#3679

Draft
alltheseas wants to merge 2 commits intodamus-io:masterfrom
alltheseas:add-stale-workflow
Draft

Add stale issue cleanup workflow#3679
alltheseas wants to merge 2 commits intodamus-io:masterfrom
alltheseas:add-stale-workflow

Conversation

@alltheseas
Copy link
Copy Markdown
Collaborator

@alltheseas alltheseas commented Mar 13, 2026

Summary

  • Adds a weekly GitHub Action (actions/stale@v9) that labels inactive issues as stalled after 60 days and auto-closes them after 30 more days (90 total)
  • Exempts bounty, security, regression, and pinned labels, plus any issue with an assignee
  • Does not affect PRs

Rationale

Issues that sit idle for a long time usually mean one of:

  1. Too big — should be broken down into smaller issues
  2. Blocked — needs explicit attention
  3. Not a priority right now — close it, reopen later if needed

This keeps the issue tracker focused on what's actually active.

Config

Setting Value
Stale after 60 days
Close after 30 more days (90 total)
Schedule Weekly, Monday 9am UTC
Exempt labels bounty, security, regression, pinned
Exempt assignees yes
PRs not affected

Note

A stalled label will need to be created for this to look right. Suggested: orange (#FFA500), description: "No activity — needs attention or triage"

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Implemented automated stale issue management to maintain a clean issue tracker. Inactive issues will be labeled after 60 days and closed after 30 additional days of inactivity. Issues marked as bounties, security concerns, regressions, or pinned, as well as assigned issues, are exempt from automatic closure.

Runs weekly on Mondays. Issues with no activity for 60 days get
labeled "stalled" with a comment. Auto-closes after 30 more days
(90 total). Exempts bounty, security, regression, and pinned
labels, plus any issue with an assignee. PRs are not affected.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 13, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5f931fe6-bf0a-4c29-aef1-daaaf3fa003d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

A new GitHub Actions workflow is introduced to automate stale issue management. The workflow runs weekly, automatically labeling issues inactive for 60 days as "stalled" and closing them after 30 additional days, with exemptions for bounty, security, regression, and pinned issues.

Changes

Cohort / File(s) Summary
Stale Issue Cleanup Workflow
.github/workflows/stale.yml
New GitHub Actions workflow configuration that automates weekly stale issue detection and management using the actions/stale@v9 action with 60-day inactivity threshold, 30-day closure window, and exemptions for bounty, security, regression, and pinned issues.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 Stale issues? Not on our watch!
A weekly sweep, precise and swift,
Sixty days of silence, then a gentle shift,
Labeled, noted, closed with grace,
Keeping our workspace a tidy place!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description provides a comprehensive summary of the workflow, rationale, and configuration, but does not follow the repository's required PR template with checklist items. Follow the Standard PR Checklist template by confirming testing, profiling (if applicable), related issues, commits, signoff lines, and changelog entries.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and clearly summarizes the main change—adding a GitHub Actions workflow for automated stale issue cleanup.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

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 and usage tips.

@alltheseas
Copy link
Copy Markdown
Collaborator Author

@coderabbitai review please

@jb55
Copy link
Copy Markdown
Collaborator

jb55 commented Mar 13, 2026

30,60 days is wayy too short. Thats like saying every issue open should only be in our current cycle, this would kill any sort of backlog

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 13, 2026

@alltheseas Sure, I'll kick off a review now! I'll note that @jb55 has already raised a concern in the thread about the 60/30-day stale/close windows being too aggressive for a project that maintains a long-term backlog — that's worth weighing during the review.


🧠 Learnings used
Learnt from: CR
Repo: damus-io/damus PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-08T01:12:51.605Z
Learning: Code should be human reviewable
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/stale.yml:
- Around line 16-17: The stale workflow currently uses days-before-stale: 60 and
days-before-close: 30 which reviewers think is too aggressive; update the values
for days-before-stale and/or days-before-close in the workflow (e.g., set
days-before-stale to 180 or 365 and keep days-before-close at 30, or use another
team-agreed combination) and confirm the chosen thresholds with the team before
merging so the .github/workflows/stale.yml reflects the agreed inactivity
windows.
- Line 18: Add documentation that the workflow in .github/workflows/stale.yml
depends on a repository label named "stalled" (configured via the
stale-issue-label key) and specify the required color `#FFA500`; update README.md
or CONTRIBUTING.md with a short section describing the exact label name
("stalled"), color (`#FFA500`), and a one-line instruction for maintainers on how
to create the label via GitHub UI or gh CLI so the workflow can run correctly.
- Line 14: Update the GitHub Actions step that references the stale action (the
line using actions/stale) to a v10 release to avoid using the outdated v9;
change the reference from actions/stale@v9 to either the major version
actions/stale@v10 or pin to the exact latest patch actions/[email protected] for
reproducible builds so the workflow uses the supported release.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9da0ec39-bbc3-44de-b143-6c8f6ae21cd4

📥 Commits

Reviewing files that changed from the base of the PR and between 1768432 and 5822489.

📒 Files selected for processing (1)
  • .github/workflows/stale.yml

stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

What is the latest version of actions/stale GitHub Action?

💡 Result:

The latest release of actions/stale is v10.2.0. [1]

In workflows, you can pin to the major line (actions/stale@v10) or to the exact release (actions/[email protected]). [2]


Update actions/stale to v10 or pin to v10.2.0 (latest).

The current v9 is outdated. The latest stable release is v10.2.0. For reproducibility, pin to the exact version (actions/[email protected]) or use the major version line (actions/stale@v10).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/stale.yml at line 14, Update the GitHub Actions step that
references the stale action (the line using actions/stale) to a v10 release to
avoid using the outdated v9; change the reference from actions/stale@v9 to
either the major version actions/stale@v10 or pin to the exact latest patch
actions/[email protected] for reproducible builds so the workflow uses the supported
release.

Comment on lines +16 to +17
days-before-stale: 60
days-before-close: 30
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Consider longer inactivity windows per reviewer feedback.

Reviewer jb55 raised a valid concern that 60/30 days may be too aggressive for a project maintaining a long-term backlog. Legitimate feature requests or enhancement ideas can easily go 90+ days without activity while still being valuable.

Common alternatives:

  • 180 days stale / 30 days close (210 total)
  • 365 days stale / 30 days close (395 total)

Consider aligning with the team on acceptable thresholds before merging.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/stale.yml around lines 16 - 17, The stale workflow
currently uses days-before-stale: 60 and days-before-close: 30 which reviewers
think is too aggressive; update the values for days-before-stale and/or
days-before-close in the workflow (e.g., set days-before-stale to 180 or 365 and
keep days-before-close at 30, or use another team-agreed combination) and
confirm the chosen thresholds with the team before merging so the
.github/workflows/stale.yml reflects the agreed inactivity windows.

with:
days-before-stale: 60
days-before-close: 30
stale-issue-label: 'stalled'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

Document the required "stalled" label setup.

The workflow requires a "stalled" label to exist. The PR description mentions creating it with color #FFA500, but this should be documented in the repository (e.g., README.md or CONTRIBUTING.md) so maintainers understand the prerequisite.

As per coding guidelines: "Update documentation when workflows change, especially this file, README.md, or developer notes."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/stale.yml at line 18, Add documentation that the workflow
in .github/workflows/stale.yml depends on a repository label named "stalled"
(configured via the stale-issue-label key) and specify the required color
`#FFA500`; update README.md or CONTRIBUTING.md with a short section describing the
exact label name ("stalled"), color (`#FFA500`), and a one-line instruction for
maintainers on how to create the label via GitHub UI or gh CLI so the workflow
can run correctly.

- v9 -> v10 (latest release is v10.2.0)
- 60 days was too aggressive for an open-source project; 180 days
  gives contributors a full half-year before an issue is marked stalled
- Close window stays at 30 days (210 total before auto-close)

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@danieldaquino danieldaquino added the pr-short Pull request with less than 100 lines of code changed label Mar 13, 2026
Copy link
Copy Markdown
Collaborator

@danieldaquino danieldaquino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I did not know this existed, very cool!

I like how it allows us to post a message before closing it, giving people time to react to it.

@danieldaquino
Copy link
Copy Markdown
Collaborator

Passing to @jb55 for a final sign-off.

@jb55
Copy link
Copy Markdown
Collaborator

jb55 commented Mar 13, 2026

@danieldaquino what are your thoughts on the time period, aren't they a bit aggressive?

@danieldaquino
Copy link
Copy Markdown
Collaborator

@danieldaquino what are your thoughts on the time period, aren't they a bit aggressive?

The original 90 days to close an issue might be a bit aggressive I agree, but the new 180 days + 30 day grace period seems reasonable to me.

I don't mind keeping things as they are or longer periods if you have concerns, but we have to remember that we can always prevent something from closing in that 30 day grace period by providing any kind of update (like breaking it down, refining it, doing some preliminary research, assigning an AI agent to try it, adding a comment like "let's keep it open", or reopening after the fact). If something is truly important it will likely be brought back up by users or us after the fact, too.

@alltheseas
Copy link
Copy Markdown
Collaborator Author

The worst case unhappy path is that we have to re-open something. We are not deleting issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-short Pull request with less than 100 lines of code changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants