1- name : " Close stale issues "
1+ name : " Stale Issue Management "
22on :
33 schedule :
4- - cron : " 0 0 * * *"
4+ # Run daily at midnight UTC
5+ - cron : " 0 0 * * *"
6+ workflow_dispatch : # Allow manual triggering
7+
8+ env :
9+ # Default stale policy timeframes
10+ DAYS_BEFORE_STALE : 365
11+ DAYS_BEFORE_CLOSE : 30
12+
13+ # Accelerated timeline for needs-information issues
14+ NEEDS_INFO_DAYS_BEFORE_STALE : 30
15+ NEEDS_INFO_DAYS_BEFORE_CLOSE : 7
516
6- permissions : {}
717jobs :
818 stale :
9- permissions :
10- issues : write # to close stale issues (actions/stale)
11- pull-requests : write # to close stale PRs (actions/stale)
19+ runs-on : ubuntu-latest
20+ steps :
21+ - uses : actions/stale@v9
22+ with :
23+ repo-token : ${{ secrets.GITHUB_TOKEN }}
24+
25+ # Default stale policy
26+ days-before-stale : ${{ env.DAYS_BEFORE_STALE }}
27+ days-before-close : ${{ env.DAYS_BEFORE_CLOSE }}
28+
29+ # Explicit stale label configuration
30+ stale-issue-label : " stale"
31+ stale-pr-label : " stale"
32+
33+ stale-issue-message : |
34+ This issue has been automatically marked as stale due to inactivity.
35+ It will be closed in 30 days if no further activity occurs.
36+ If you believe this issue is still relevant, please add a comment to keep it open.
37+
38+ close-issue-message : |
39+ This issue has been automatically closed due to inactivity.
40+ If you believe this issue is still relevant, please reopen it or create a new issue with updated information.
41+
42+ # Exclude needs-information issues from this job
43+ exempt-issue-labels : ' no-stale,needs-information'
44+
45+ # Remove stale label when issue/PR becomes active again
46+ remove-stale-when-updated : true
47+
48+ # Apply to pull requests with same timeline
49+ days-before-pr-stale : ${{ env.DAYS_BEFORE_STALE }}
50+ days-before-pr-close : ${{ env.DAYS_BEFORE_CLOSE }}
1251
52+ stale-pr-message : |
53+ This pull request has been automatically marked as stale due to inactivity.
54+ It will be closed in 30 days if no further activity occurs.
55+
56+ close-pr-message : |
57+ This pull request has been automatically closed due to inactivity.
58+ If you would like to continue this work, please reopen the PR or create a new one.
59+
60+ # Only exclude no-stale PRs (needs-information PRs follow standard timeline)
61+ exempt-pr-labels : ' no-stale'
62+
63+ # Separate job for needs-information issues ONLY with accelerated timeline
64+ stale-needs-info :
1365 runs-on : ubuntu-latest
1466 steps :
15- - uses : actions/stale@v9
16- with :
17- repo-token : ${{ secrets.GITHUB_TOKEN }}
18- stale-issue-message : ' This issue is marked stale. It will be closed in 30 days if it is not updated.'
19- stale-pr-message : ' This pull request is marked stale. It will be closed in 30 days if it is not updated.'
20- days-before-stale : 365
21- days-before-close : 30
22- stale-issue-label : " Stale"
23- stale-pr-label : " Stale"
24- operations-per-run : 10
25- remove-stale-when-updated : true
67+ - uses : actions/stale@v9
68+ with :
69+ repo-token : ${{ secrets.GITHUB_TOKEN }}
70+
71+ # Accelerated timeline for needs-information
72+ days-before-stale : ${{ env.NEEDS_INFO_DAYS_BEFORE_STALE }}
73+ days-before-close : ${{ env.NEEDS_INFO_DAYS_BEFORE_CLOSE }}
74+
75+ # Explicit stale label configuration
76+ stale-issue-label : " stale"
77+
78+ # Only target ISSUES with needs-information label (not PRs)
79+ only-issue-labels : ' needs-information'
80+
81+ stale-issue-message : |
82+ This issue has been marked as stale because it requires additional information
83+ that has not been provided for 30 days. It will be closed in 7 days if the
84+ requested information is not provided.
85+
86+ close-issue-message : |
87+ This issue has been closed because the requested information was not provided within the specified timeframe.
88+ If you can provide the missing information, please reopen this issue or create a new one.
89+
90+ # Disable PR processing for this job
91+ days-before-pr-stale : -1
92+ days-before-pr-close : -1
93+
94+ # Remove stale label when issue becomes active again
95+ remove-stale-when-updated : true
0 commit comments