Skip to content

Commit 54d1d50

Browse files
feat: add stale issues and PRs auto-close workflow
1 parent 8f4904d commit 54d1d50

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: "Close stale issues and PRs"
2+
3+
on:
4+
schedule:
5+
- cron: "30 1 * * *" # Runs daily at 1:30 AM UTC
6+
workflow_dispatch: # Allows manual triggering for testing
7+
8+
permissions:
9+
issues: write
10+
pull-requests: write
11+
12+
jobs:
13+
stale:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Mark stale issues and pull requests
17+
uses: actions/stale@v10
18+
with:
19+
# Time before marking an issue/PR as stale (in days)
20+
days-before-stale: 30
21+
# Time to wait after marking stale before closing (in days)
22+
days-before-close: 5
23+
# Operations per run to avoid rate limiting (default: 30)
24+
operations-per-run: 30
25+
# Issue configuration
26+
stale-issue-message: >
27+
This issue has been automatically marked as stale because it has been open for 30 days with no activity.
28+
29+
To keep this issue open, please:
30+
- Add a comment with any updates or progress
31+
- Add the `not-stale` label
32+
33+
This issue will be automatically closed in 5 days if no activity occurs.
34+
close-issue-message: >
35+
This issue was automatically closed because it remained stale for 5 days with no activity.
36+
37+
If you believe this issue is still relevant, please feel free to reopen it or create a new issue with updated information.
38+
stale-issue-label: "stale"
39+
close-issue-label: "closed-stale"
40+
# PR configuration
41+
stale-pr-message: >
42+
This pull request has been automatically marked as stale because it has been open for 30 days with no activity.
43+
44+
To keep this pull request open, please:
45+
- Add a comment with any updates or progress
46+
- Add the `not-stale` label
47+
48+
This pull request will be automatically closed in 5 days if no activity occurs.
49+
close-pr-message: >
50+
This pull request was automatically closed because it remained stale for 5 days with no activity.
51+
52+
If you believe this pull request is still relevant, please feel free to reopen it or create a new pull request with updated information.
53+
stale-pr-label: "stale"
54+
close-pr-label: "closed-stale"
55+
# Automatically remove stale label when issue/PR is updated (false = don't ignore updates)
56+
ignore-issue-updates: false
57+
ignore-pr-updates: false

0 commit comments

Comments
 (0)