Skip to content

Commit a1cab6f

Browse files
committed
Add "close stale issues or PRs" action
1 parent 0d3a646 commit a1cab6f

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

.github/workflows/stale.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: stale.yml
2+
on:
3+
schedule:
4+
- cron: '0 0 * * *' # Run every day at midnight
5+
6+
permissions:
7+
issues: write
8+
pull-requests: write
9+
10+
jobs:
11+
close_stale_prs:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Close stale issues and pull requests
15+
uses: actions/stale@v9.1.0
16+
with:
17+
days-before-stale: 30
18+
days-before-close: 5
19+
stale-issue-message: 'This issue has been flagged as stale due to over 30 days of inactivity. If no updates or comments are made within the next 5 days, the system will automatically close it to maintain repository hygiene.'
20+
close-issue-message: 'This issue has been automatically closed due to prolonged inactivity. It was previously marked as stale after 30 days without activity and has now been closed following an additional 5-day grace period. If you believe this issue should be reopened, please provide a comment with relevant updates or justification.'
21+
stale-pr-message: 'This pull request has been marked as stale due to 30 days of inactivity. If no further updates or comments are made within the next 5 days, it will be automatically closed to maintain repository hygiene and reduce review backlog.'
22+
close-pr-message: 'This pull request has been automatically closed due to extended inactivity. It was previously flagged as stale after 30 days without activity and has now been closed following a 5-day grace period. If you believe this pull request is still relevant, feel free to reopen it or submit a new one with updated context.'

0 commit comments

Comments
 (0)