Skip to content

Commit 13b734b

Browse files
committed
[ci] add lock workflow to lock issues/PRs with over 150 days of inactivity, to avoid confusion of new version on old issues
1 parent 37b31c7 commit 13b734b

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

.github/workflows/lock.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: "Lock closed issues and PRs"
2+
3+
on:
4+
schedule:
5+
- cron: "0 3 * * *" # every day at 03:00 UTC
6+
workflow_dispatch:
7+
8+
jobs:
9+
lock:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: dessant/lock-threads@v5
14+
with:
15+
github-token: ${{ secrets.GITHUB_TOKEN }}
16+
17+
issue-inactive-days: 150
18+
pr-inactive-days: 150
19+
20+
issue-comment: >
21+
This issue has been automatically locked because it has been closed for 150 days.
22+
Please open a new issue if you have a similar problem.
23+
24+
pr-comment: >
25+
This pull request has been automatically locked because it has been closed for 150 days.
26+
Please open a new PR if you want to continue the work.
27+
28+
exclude-issue-labels: "keep-open,no-lock"
29+
exclude-pr-labels: "keep-open,no-lock"

.github/workflows/stale.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ jobs:
1414
days-before-stale: 60
1515
days-before-close: 90
1616
stale-issue-message: 'This issue has been automatically marked as stale due to inactivity for past 2 months. It will be closed in next 30 days if no further activity occurs.'
17-
close-issue-message: 'Closing this issue due to prolonged inactivity.'
17+
close-issue-message: 'Closing this issue as inactive for 30 days after marking stale.'
18+
operations-per-run: 10

0 commit comments

Comments
 (0)