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