Skip to content

Commit 9a1e303

Browse files
Copilotmnriem
andauthored
Add stale workflow for 180-day inactive issues and PRs (#1594)
* Initial plan * Add stale issues and PRs workflow Co-authored-by: mnriem <15701806+mnriem@users.noreply.github.com> * Add 7-day grace period before closing stale items Co-authored-by: mnriem <15701806+mnriem@users.noreply.github.com> * Update stale timing: mark at 150 days, close at 180 days Co-authored-by: mnriem <15701806+mnriem@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: mnriem <15701806+mnriem@users.noreply.github.com>
1 parent f14a47e commit 9a1e303

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.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+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *' # Run daily at midnight UTC
6+
workflow_dispatch: # Allow manual triggering
7+
8+
permissions:
9+
issues: write
10+
pull-requests: write
11+
12+
jobs:
13+
stale:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/stale@v9
17+
with:
18+
# Days of inactivity before an issue or PR becomes stale
19+
days-before-stale: 150
20+
# Days of inactivity before a stale issue or PR is closed (after being marked stale)
21+
days-before-close: 30
22+
23+
# Stale issue settings
24+
stale-issue-message: 'This issue has been automatically marked as stale because it has not had any activity for 150 days. It will be closed in 30 days if no further activity occurs.'
25+
close-issue-message: 'This issue has been automatically closed due to inactivity (180 days total). If you believe this issue is still relevant, please reopen it or create a new issue.'
26+
stale-issue-label: 'stale'
27+
28+
# Stale PR settings
29+
stale-pr-message: 'This pull request has been automatically marked as stale because it has not had any activity for 150 days. It will be closed in 30 days if no further activity occurs.'
30+
close-pr-message: 'This pull request has been automatically closed due to inactivity (180 days total). If you believe this PR is still relevant, please reopen it or create a new PR.'
31+
stale-pr-label: 'stale'
32+
33+
# Exempt issues and PRs with these labels from being marked as stale
34+
exempt-issue-labels: 'pinned,security'
35+
exempt-pr-labels: 'pinned,security'
36+
37+
# Only issues or PRs with all of these labels are checked
38+
# Leave empty to check all issues and PRs
39+
any-of-labels: ''
40+
41+
# Operations per run (helps avoid rate limits)
42+
operations-per-run: 100

0 commit comments

Comments
 (0)