Skip to content

Commit a1a0a07

Browse files
authored
ci: add nightly stale cron (#9802)
Add nightly cron to label/close stale issues.
1 parent afd0b54 commit a1a0a07

File tree

1 file changed

+30
-15
lines changed

1 file changed

+30
-15
lines changed

.github/workflows/stale.yml

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
name: stale
22

33
on:
4+
schedule:
5+
# Run nightly at 1am EST
6+
- cron: '0 5 * * *'
7+
48
workflow_dispatch:
9+
inputs:
10+
dry-run:
11+
description: Run the stale action in debug-only mode
12+
default: false
13+
required: false
14+
type: boolean
515

616
jobs:
717
stale:
@@ -13,30 +23,35 @@ jobs:
1323
- uses: actions/stale@v9
1424
id: stale
1525
with:
16-
debug-only: true
17-
days-before-stale: 90
26+
debug-only: ${{ inputs.dry-run || false }}
27+
28+
days-before-stale: 23
1829
days-before-close: 7
30+
days-before-pr-close: -1 # Never close PRs
1931
ascending: true
2032
operations-per-run: 300
2133

22-
# Ignore all assigned
23-
exempt-all-assignees: false
24-
2534
# Issues
26-
stale-issue-label: 'stale'
27-
exempt-issue-labels: 'blocked,must,should,keep,created-by: Payload team,created-by: Contributor'
28-
stale-issue-message: >
29-
This issue has been marked as stale due to lack of activity. To keep the ticket open, please indicate that it is still relevant in a comment below.
30-
close-issue-message: >
35+
stale-issue-label: stale
36+
exempt-issue-labels: 'prioritized,keep,created-by: Payload team,created-by: Contributor,status: verified'
37+
stale-issue-message: |
38+
This issue has been marked as stale due to lack of activity.
39+
40+
To keep this issue open, please indicate that it is still relevant in a comment below.
41+
42+
close-issue-message: |
3143
This issue was automatically closed due to lack of activity.
3244
3345
# Pull Requests
34-
stale-pr-label: 'stale'
35-
exempt-pr-labels: 'blocked,must,should,keep,created-by: Payload team,created-by: Contributor'
36-
stale-pr-message: >
37-
This PR is stale due to lack of activity. To keep the PR open, please indicate that it is still relevant in a comment below.
38-
close-pr-message: >
46+
stale-pr-label: stale
47+
exempt-pr-labels: 'prioritized,keep,created-by: Payload team,created-by: Contributor'
48+
stale-pr-message: |
49+
This PR is stale due to lack of activity.
50+
51+
To keep the PR open, please indicate that it is still relevant in a comment below.
52+
close-pr-message: |
3953
This pull request was automatically closed due to lack of activity.
4054
55+
# TODO: Add a step to notify team
4156
- name: Print outputs
4257
run: echo ${{ format('{0},{1}', toJSON(steps.stale.outputs.staled-issues-prs), toJSON(steps.stale.outputs.closed-issues-prs)) }}

0 commit comments

Comments
 (0)