Skip to content

Commit b05c2dc

Browse files
authored
Add workflow to mark inactive issues
1 parent 842003a commit b05c2dc

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Close inactive issues
2+
on:
3+
schedule:
4+
- cron: "30 8 * * *"
5+
6+
jobs:
7+
close-issues:
8+
runs-on: ubuntu-latest
9+
env:
10+
PR_DAYS_BEFORE_STALE: 60
11+
PR_DAYS_BEFORE_CLOSE: 10
12+
PR_STALE_LABEL: stale
13+
permissions:
14+
issues: write
15+
pull-requests: write
16+
steps:
17+
- uses: actions/stale@v9
18+
with:
19+
days-before-issue-stale: ${{ env.PR_DAYS_BEFORE_STALE }}
20+
days-before-issue-close: ${{ env.PR_DAYS_BEFORE_CLOSE }}
21+
stale-issue-label: ${{ env.PR_STALE_LABEL }}
22+
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."
23+
close-issue-message: "This issue was closed because it has been inactive for ${{ env.PR_DAYS_BEFORE_CLOSE }} days since being marked as stale."
24+
days-before-pr-stale: -1
25+
days-before-pr-close: -1
26+
# Start with the oldest items first
27+
ascending: true
28+
repo-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)