Skip to content

Commit c1f7509

Browse files
[QoL] Add bot for stale issues (alexjustesen#2141)
Co-authored-by: Alex Justesen <[email protected]>
1 parent aac6a69 commit c1f7509

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/stale_issues.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Close Stale Issues
2+
3+
on:
4+
# Runs daily at 10:00 AM UTC
5+
schedule:
6+
- cron: '0 10 * * *'
7+
# Runs at issue comment
8+
issue_comment:
9+
types: [created]
10+
11+
# Allow manual trigger
12+
workflow_dispatch:
13+
14+
jobs:
15+
manage-stale-issues:
16+
runs-on: ubuntu-24.04
17+
18+
steps:
19+
- name: Close Stale Issues
20+
uses: actions/stale@v9
21+
with:
22+
repo-token: ${{ secrets.GITHUB_TOKEN }}
23+
24+
# Issue-specific configuration
25+
stale-issue-message: >
26+
👋 This issue has been automatically marked as stale due to inactivity.
27+
If this issue is still relevant, please comment to keep it open.
28+
Without activity, it will be closed in 7 days.
29+
30+
close-issue-message: >
31+
🔒 This issue has been automatically closed due to prolonged inactivity.
32+
Feel free to reopen if the issue is still valid.
33+
34+
# More nuanced staleness criteria
35+
days-before-issue-stale: 7 # Mark as stale after 7 days of inactivity
36+
days-before-issue-close: 7 # Close 7 days after being marked stale
37+
38+
# More specific labeling
39+
stale-issue-label: 'no-issue-activity'
40+
close-issue-label: 'closed-no-issue-activity'
41+
42+
# Refined issue selection, Only issues with both bug and question label
43+
only-issue-labels: 'bug, question'
44+
45+
# Issues will be closed as "Not Planned" by default.

0 commit comments

Comments
 (0)