Skip to content

Commit d15953f

Browse files
CME-787: Add workflow to close stale issues and PRs automatically (#1122)
* Add workflow to close stale issues and PRs automatically * Update stale.yml --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 4775ec0 commit d15953f

File tree

2 files changed

+42
-18
lines changed

2 files changed

+42
-18
lines changed

.github/stale.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/stale.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: 'Close stale issues and PRs'
2+
on:
3+
schedule:
4+
- cron: '0 19 * * *' # Run daily at 7pm GMT
5+
workflow_dispatch: # Allow manual trigger
6+
7+
permissions:
8+
issues: write
9+
pull-requests: write
10+
contents: write # Required for delete-branch option
11+
12+
jobs:
13+
stale:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/stale@v10
17+
with:
18+
# Stale issues configuration
19+
days-before-issue-stale: 90
20+
days-before-issue-close: 30
21+
stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Please comment if you believe this issue should remain open.'
22+
stale-issue-label: 'stale'
23+
close-issue-message: 'This issue has been automatically closed due to inactivity. Please feel free to reopen if needed.'
24+
25+
# Stale PRs configuration
26+
days-before-pr-stale: 90
27+
days-before-pr-close: 30
28+
stale-pr-message: 'This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs.'
29+
stale-pr-label: 'stale'
30+
close-pr-message: 'This pull request has been automatically closed due to inactivity. Please feel free to reopen if needed.'
31+
32+
# Exemptions
33+
# Note: Renovate PRs typically have the "dependencies" label which is also excluded
34+
exempt-pr-labels: 'pinned,dependencies'
35+
exempt-all-pr-assignees: false
36+
exempt-all-issue-assignees: false
37+
38+
# Delete branch after closing stale PR
39+
delete-branch: true
40+
41+
# Operations per run
42+
operations-per-run: 50

0 commit comments

Comments
 (0)