Skip to content

Commit d5d13cb

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 d5d13cb

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

.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"

0 commit comments

Comments
 (0)