Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Automatically label and close stale issues #763

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/close-stale-issues.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Close inactive issues
on:
schedule:
- cron: "30 2 1 * *"

jobs:
close-issues:
runs-on: ubuntu-22.04
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v5
with:
days-before-issue-stale: 365
days-before-issue-close: 365
stale-issue-label: "stale"
stale-issue-message: "This issue is stale because it has been open for a year with no activity."
close-issue-message: "This issue was closed because it has been inactive for a year since being marked as stale."
Copy link
Contributor

Choose a reason for hiding this comment

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

IMHO, if doing this (unsure if a good idea at all), then we should to change the language to be a bit more inviting.

E.g.

Suggested change
close-issue-message: "This issue was closed because it has been inactive for a year since being marked as stale."
close-issue-message: "This issue was closed because it has been inactive for a year since being marked as stale. Feel free to re-open this issue if it is still relevant to you."

And we should ensure the issue can actually be re-opened (by anyone).

days-before-pr-stale: -1
days-before-pr-close: -1
repo-token: ${{ secrets.GITHUB_TOKEN }}
debug-only: true # remove this to activate this GH action
Loading