Add workflow to mark stale issues and PRs
Browse files- Runs daily at 22:30 UTC+08
- Marks issues stale after 90 days
- Closes stale issues after 7 more days
- .github/workflows/stale.yaml +27 -0
.github/workflows/stale.yaml
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# .github/workflows/stale.yml
|
2 |
+
name: Mark stale issues and pull requests
|
3 |
+
|
4 |
+
on:
|
5 |
+
schedule:
|
6 |
+
- cron: '30 22 * * *' # run at 22:30+08 every day
|
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-before-stale: 90 # 90 days
|
19 |
+
days-before-close: 7 # 7 days after marked as stale
|
20 |
+
stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.'
|
21 |
+
close-issue-message: 'This issue has been automatically closed because it has not had recent activity. Please open a new issue if you still have this problem.'
|
22 |
+
stale-pr-message: 'This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.'
|
23 |
+
close-pr-message: 'This pull request has been automatically closed because it has not had recent activity.'
|
24 |
+
# If there are specific labels, exempt them from being marked as stale, for example:
|
25 |
+
exempt-issue-labels: 'enhancement,tracked'
|
26 |
+
# exempt-pr-labels: 'bug,enhancement,help wanted'
|
27 |
+
repo-token: ${{ secrets.GITHUB_TOKEN }} # token provided by GitHub
|