Skip to content

Commit 7957d22

Browse files
Add Github action to close stale issues
The added workflow will close up to 30 old issues every day. Issues that have been inactive for more than a year will be first marked as stale, and if they remain stale after 15 days they will be automatically closed.
1 parent 5090124 commit 7957d22

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/stale.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: 'Close Stale Issues'
2+
on:
3+
schedule:
4+
# Run everyday at 1 PM UTC
5+
- cron: '0 13 * * *'
6+
7+
jobs:
8+
stale:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/stale@v9
12+
with:
13+
# The message to be shown for stale issues
14+
stale-issue-message: 'This issue has been inactive for a year and has been marked as stale. It will be closed in 15 days if it continues to be stale. If you believe this is still an issue, please add a comment.'
15+
close-issue-message: 'This issue has been marked stale for 15 days and has been automatically closed.'
16+
# If you want to exempt an issue from being marked stale/deleted, label it as 'no-stale'
17+
exempt-issue-labels: 'no-stale'
18+
days-before-issue-stale: 365
19+
days-before-issue-close: 15
20+
# Start from the oldest issues
21+
ascending: true
22+
23+
# The configuration below can be used to allow the same behaviour with PRs.
24+
# Since we currently don't want to close old PRs, it is commented out but
25+
# left here in case we change our mind.
26+
27+
# stale-pr-message: 'This PR has been inactive for a year and has been marked as stale. It will be closed in 15 days if it continues to be stale. If you are still working on this PR, please add a comment.'
28+
# close-pr-message: 'This PR has been marked stale for 15 days and has been automatically closed.'
29+
# exempt-pr-labels: 'no-stale'
30+
# days-before-pr-stale: 365
31+
# days-before-pr-close: 15

0 commit comments

Comments
 (0)