Skip to content

Commit 5b6b462

Browse files
bmuenzenmeyergireeshpunathil
authored andcommitted
build: add stale issue action
PR-URL: #4072 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent e9936f0 commit 5b6b462

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Close stale issues
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
# Run every day at 1:00 AM UTC.
6+
- cron: 0 1 * * *
7+
8+
# yamllint disable rule:empty-lines
9+
env:
10+
CLOSE_MESSAGE: >
11+
There has been no activity on this issue
12+
and it is being closed. If you feel closing this issue is not the
13+
right thing to do, please leave a comment.
14+
WARN_MESSAGE: >
15+
There has been no activity on this issue for
16+
3 years and it may no longer be relevant.
17+
It will be closed 1 month after the last non-automated comment.
18+
# yamllint enable
19+
20+
jobs:
21+
stale:
22+
if: github.repository == 'nodejs/help'
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/stale@v4
26+
with:
27+
repo-token: ${{ secrets.GITHUB_TOKEN }}
28+
# 3 years. this number is chosen to target around 25 initial issues, with then a natural flow as time progresses
29+
days-before-stale: 1095
30+
days-before-close: 30
31+
stale-issue-label: stale
32+
close-issue-message: ${{ env.CLOSE_MESSAGE }}
33+
stale-issue-message: ${{ env.WARN_MESSAGE }}
34+
# max requests it will send per run to the GitHub API before it deliberately exits to avoid hitting API rate limits
35+
operations-per-run: 30
36+
remove-stale-when-updated: true

0 commit comments

Comments
 (0)