Skip to content

Commit 9447474

Browse files
committed
feat: add workflow to automatically close stale issues
1 parent f5be1d3 commit 9447474

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/stale-issues.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Close Stale Issues
2+
3+
on:
4+
schedule:
5+
# Run once daily at midnight UTC
6+
- cron: "0 0 * * *"
7+
workflow_dispatch: # Allow manual triggering
8+
9+
jobs:
10+
stale:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
issues: write
14+
pull-requests: write
15+
16+
steps:
17+
- uses: actions/stale@v9
18+
with:
19+
# Inactive days before marking as stale
20+
days-before-stale: 60
21+
# Days before closing after marking as stale (0 means close immediately)
22+
days-before-close: 7
23+
# Do not process PRs, only issues
24+
days-before-pr-stale: -1
25+
days-before-pr-close: -1
26+
# Label to add to inactive issues
27+
stale-issue-label: "stale"
28+
# Comment when marking as stale
29+
stale-issue-message: "This issue has been inactive for 2 months and will be automatically closed in 7 days. If the issue still exists, please reply to this issue."
30+
# Comment when closing
31+
close-issue-message: "This issue has been automatically closed due to prolonged inactivity. You can reopen it if necessary."
32+
# Labels of issues that will not be closed
33+
exempt-issue-labels: "pinned,security,bug"
34+
# Labels of issues that will not be closed
35+
# exempt-assignees: 'username1,username2'

0 commit comments

Comments
 (0)