Skip to content

Commit 18451a9

Browse files
authored
Merge pull request #627 from BioContainers/ci/stale-prs
Add stale-PR workflow (close PRs after 6 months of inactivity)
2 parents 4a4443e + 71cc732 commit 18451a9

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

.github/workflows/stale.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Auto-close pull requests whose author hasn't returned in ~6 months.
2+
# A PR is marked "stale" after 180 days of inactivity, warned, then closed 14
3+
# days later if still no response. Any comment or new commit clears the stale
4+
# mark; a closed PR can be reopened (or a fresh PR opened) at any time. Issues
5+
# are deliberately left untouched. Add a "keep" label to exempt a PR.
6+
name: stale-prs
7+
8+
on:
9+
schedule:
10+
- cron: "30 1 * * *" # daily, 01:30 UTC
11+
workflow_dispatch: # allow manual runs / dry runs
12+
13+
permissions:
14+
contents: read
15+
issues: write # labelling/commenting a PR uses the issues API
16+
pull-requests: write
17+
18+
concurrency:
19+
group: stale-prs
20+
cancel-in-progress: false
21+
22+
jobs:
23+
stale:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/stale@v9
27+
with:
28+
# Pull requests only — never touch issues.
29+
days-before-issue-stale: -1
30+
days-before-issue-close: -1
31+
32+
# ~6 months with no activity -> stale; 14 more days of silence -> close.
33+
days-before-pr-stale: 180
34+
days-before-pr-close: 14
35+
36+
stale-pr-label: stale
37+
exempt-pr-labels: keep,pinned,security,wip,blocked
38+
exempt-draft-pr: true
39+
40+
stale-pr-message: >
41+
👋 This pull request hasn't had any activity for 6 months, so it has
42+
been marked **stale**. If it's still relevant, just leave a comment or
43+
push an update and we'll take another look — otherwise it will be
44+
closed in 14 days.
45+
46+
close-pr-message: >
47+
This PR has been **staled** after 6+ months without activity and is
48+
being closed to keep the review queue tidy. No work is lost — please
49+
**re-open it** (or open a fresh PR) whenever you'd like to continue.
50+
51+
# Oldest first, and cap API calls per run so a large backlog is worked
52+
# through gradually over several daily runs rather than all at once.
53+
ascending: true
54+
operations-per-run: 60

0 commit comments

Comments
 (0)