Skip to content

Commit 614c15a

Browse files
authored
Implement Stale PR Handling and Update Stale Issue Handling (#2151)
* Implement Stale PR Handling and Update Stale Issue Handling Use actions/stale to perform the following actions twice daily: - Mark PRs that haven't been touched for 30 days as stale. - Close PRs that have been marked stale for 7 days without an update. Update stale issue handling: - Mark issues that haven't been touched in 6 years as stale (increased from 1 year). - Remove inputs section and directly specify values, as the inputs section was not being properly referenced and default values were being used. * Allow manual triggering of the action.
1 parent 24e1fed commit 614c15a

File tree

1 file changed

+9
-19
lines changed

1 file changed

+9
-19
lines changed

.github/workflows/stale.yml

+9-19
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,8 @@
11
name: 'Stale: Label and Close Issues'
22
on:
33
schedule:
4-
- cron: '23 2,14 * * *' # Twice daily at 19 minutes after the hour (random/uncommon time)
5-
6-
workflow_dispatch:
7-
# Manual triggering through the GitHub UI, API, or CLI
8-
inputs:
9-
daysBeforeStale:
10-
required: true
11-
default: "365"
12-
daysBeforeClose:
13-
required: true
14-
default: "30"
15-
operationsPerRun:
16-
required: true
17-
default: "4000"
4+
- cron: '23 2,14 * * *' # Twice daily at 23 minutes after the hour (random/uncommon time)
5+
workflow_dispatch: # Allows manual triggering
186

197
permissions:
208
actions: write # For managing the operation state cache
@@ -32,8 +20,10 @@ jobs:
3220
stale-issue-label: 'stale'
3321
stale-issue-message: "Due to lack of recent activity, this issue has been labeled as 'stale'. It will be closed if no further activity occurs within 30 more days. Any new comment will remove the label."
3422
close-issue-message: "This issue will now be closed since it has been labeled 'stale' without activity for 30 days."
35-
days-before-stale: ${{ fromJson(inputs.daysBeforeStale || 2192) }} # Default to 6 years if not specified as input
36-
days-before-close: ${{ fromJson(inputs.daysBeforeClose || 30 ) }} # Default to 30 days if not specified as input
37-
days-before-pr-stale: -1 # Do not label PRs as 'stale'
38-
days-before-pr-close: -1 # Do not close PRs labeled as 'stale'
39-
operations-per-run: ${{ fromJson(inputs.operationsPerRun || 4000 )}}
23+
stale-pr-message: "Due to lack of recent activity, this PR has been labeled as 'stale'. It will be closed if no further activity occurs within 7 more days. Any new comment will remove the label."
24+
close-pr-message: "This PR will now be closed since it has been labeled 'stale' without activity for 30 days."
25+
days-before-stale: 2192 # 6 years
26+
days-before-close: 30
27+
days-before-pr-stale: 30
28+
days-before-pr-close: 7
29+
operations-per-run: 4000

0 commit comments

Comments
 (0)