Skip to content

Commit c1e8ef2

Browse files
authored
ci: add stale PR workflow (#263)
1 parent 45b8fae commit c1e8ef2

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/stale.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Mark and Close Stale PRs
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * 5' # Run at midnight every Friday
6+
workflow_dispatch: # Allow manual triggering
7+
8+
permissions:
9+
actions: write
10+
contents: write # only for delete-branch option
11+
issues: write
12+
pull-requests: write
13+
14+
jobs:
15+
stale:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Mark and Close Stale PRs
19+
uses: actions/stale@v9
20+
with:
21+
# PR specific settings
22+
stale-pr-message: 'This PR has been marked as stale due to 30 days of inactivity. It will be closed in 7 days if no further activity occurs.'
23+
close-pr-message: 'This PR has been closed due to inactivity. Feel free to reopen if you wish to continue working on it.'
24+
days-before-pr-stale: 30
25+
days-before-pr-close: 7
26+
stale-pr-label: 'stale'
27+
exempt-pr-labels: 'no-stale,dependencies,security'
28+
exempt-draft-pr: true
29+
30+
# Issue specific settings - disabled by default
31+
days-before-issue-stale: -1
32+
days-before-issue-close: -1
33+
34+
# General settings
35+
operations-per-run: 100
36+
ascending: true # Older PRs are processed first
37+
remove-stale-when-updated: true

0 commit comments

Comments
 (0)