Skip to content

Commit 16dc579

Browse files
haleycodekodster28
andauthored
Add Stale Issue Action (#26035)
* Add Stale Issue Action * Update .github/workflows/close-stale-issues-prs.yml Co-authored-by: Kody Jackson <[email protected]> --------- Co-authored-by: Kody Jackson <[email protected]>
1 parent a286467 commit 16dc579

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Close stale issues and pull requests (uses actions/stale@v4 with GITHUB_TOKEN)
2+
on:
3+
schedule:
4+
- cron: '0 0 * * 1' # weekly run: every Monday at 00:00 UTC
5+
workflow_dispatch:
6+
7+
permissions:
8+
issues: write
9+
pull-requests: write
10+
11+
name: Close stale issues and PRs
12+
13+
jobs:
14+
stale:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Run stale action
18+
uses: actions/stale@v4
19+
with:
20+
repo-token: ${{ secrets.GITHUB_TOKEN }}
21+
# Messages for issues (mention the issue author)
22+
stale-issue-message: 'Hello @{{author}}, this issue has been automatically marked as stale because it has not had recent activity. It will be auto-closed after and additional 10 days of inactivity. Please feel free to add a comment and we would be happy to continue working on it.'
23+
close-issue-message: 'Hello @{{author}}, this issue has been automatically closed due to 45 days of inactivity. If needed, please reopen or comment and we can reevaluate your request.'
24+
# Messages for pull requests (mention the PR author)
25+
stale-pr-message: 'Hello @{{author}}, this pull request has been automatically marked as stale because it has not had recent activity. It will be auto-closed after and additional 10 days of inactivity. Please feel free to add a comment and we would be happy to continue working on it.'
26+
close-pr-message: 'Hello @{{author}}, this pull request has been automatically closed due to 45 days of inactivity. If needed, please reopen or comment and we can reevaluate your request.'
27+
# Time thresholds (adjust to your policy)
28+
days-before-stale: 35
29+
days-before-close: 10
30+
operations-per-run: 5

0 commit comments

Comments
 (0)