-
Notifications
You must be signed in to change notification settings - Fork 3.7k
28 lines (27 loc) · 1.13 KB
/
close-inactive-issues.yml
File metadata and controls
28 lines (27 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
name: Close inactive issues
on:
schedule:
- cron: "30 8 * * *"
jobs:
close-issues:
runs-on: ubuntu-latest
env:
PR_DAYS_BEFORE_STALE: 30
PR_DAYS_BEFORE_CLOSE: 60
PR_STALE_LABEL: stale
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v10
with:
days-before-issue-stale: ${{ env.PR_DAYS_BEFORE_STALE }}
days-before-issue-close: ${{ env.PR_DAYS_BEFORE_CLOSE }}
stale-issue-label: ${{ env.PR_STALE_LABEL }}
stale-issue-message: "This issue is stale because it has been open for ${{ env.PR_DAYS_BEFORE_STALE }} days with no activity. Leave a comment to avoid closing this issue in ${{ env.PR_DAYS_BEFORE_CLOSE }} days."
close-issue-message: "This issue was closed because it has been inactive for ${{ env.PR_DAYS_BEFORE_CLOSE }} days since being marked as stale."
days-before-pr-stale: ${{ env.PR_DAYS_BEFORE_STALE }}
days-before-pr-close: ${{ env.PR_DAYS_BEFORE_STALE }}
# Start with the oldest items first
ascending: true
repo-token: ${{ secrets.GITHUB_TOKEN }}