Skip to content

Commit f3b2c39

Browse files
committed
Add GitHub Actions workflow to manage stale issues/PRs
1 parent 9ac78cc commit f3b2c39

1 file changed

Lines changed: 56 additions & 0 deletions

File tree

.github/workflows/stale.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Stale Items
2+
on:
3+
schedule:
4+
- cron: "0 6 * * 0"
5+
6+
workflow_dispatch:
7+
8+
jobs:
9+
stale:
10+
name: Mark and Close Stale Items
11+
runs-on: ubuntu-latest
12+
permissions:
13+
issues: write
14+
pull-requests: write
15+
steps:
16+
- uses: actions/stale@v9
17+
with:
18+
repo-token: ${{ secrets.GITHUB_TOKEN }}
19+
20+
days-before-stale: 365
21+
days-before-close: 45
22+
23+
# Issue configuration
24+
stale-issue-label: "stale"
25+
close-issue-label: "closed:stale"
26+
exempt-issue-labels: "pinned,security,enhancement,bug,backlog,epic"
27+
28+
stale-issue-message: |
29+
## ⏰ Stale Issue
30+
31+
This issue has had no activity for 1 year.
32+
It will be closed in 45 days unless there is new activity.
33+
To keep it open, comment or remove the `stale` label.
34+
35+
close-issue-message: |
36+
## 🔒 Closed: Inactive Issue
37+
38+
Closed after 45 days of inactivity.
39+
To reopen, comment with a reason and a maintainer will review.
40+
41+
# PR configuration
42+
stale-pr-label: "stale"
43+
close-pr-label: "closed:stale"
44+
exempt-pr-labels: "pinned,work-in-progress,ready-for-review"
45+
46+
stale-pr-message: |
47+
## ⏰ Stale Pull Request
48+
49+
No activity for 1 year. Will close in 45 days unless updated.
50+
To keep open, push commits, comment, or remove the `stale` label.
51+
52+
close-pr-message: |
53+
## 🔒 Closed: Inactive PR
54+
55+
Closed after 45 days of inactivity.
56+
To continue, reopen or submit a new PR and reference this one.

0 commit comments

Comments
 (0)