Skip to content

Commit bf37859

Browse files
committed
CI: add workflow to close answered issues automatically
1 parent 1a47933 commit bf37859

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: "Close answered issues"
2+
on:
3+
schedule:
4+
- cron: "00 10 * * *"
5+
workflow_dispatch:
6+
env:
7+
days-before-stale: 30
8+
days-before-close: 7
9+
jobs:
10+
mark-stale-and-close-for-answered:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/stale@v6
14+
with:
15+
repo-token: ${{ secrets.GITHUB_TOKEN }}
16+
days-before-stale: ${{ env.days-before-stale }}
17+
days-before-close: ${{ env.days-before-close }}
18+
days-before-pr-stale: -1
19+
stale-issue-message: "This issue has been automatically marked as stale because it has been open ${{ env.days-before-stale }} days with no activity after answered. Remove stale label or comment or this issue will be closed in ${{ env.days-before-close }} days."
20+
close-issue-message: "This issue was automatically closed because of stale in ${{ env.days-before-close }} days"
21+
stale-issue-label: "stale"
22+
only-labels: "answered"
23+
close-issue-reason: "completed"

0 commit comments

Comments
 (0)