Lock closed issues and PRs #519
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Lock closed issues and PRs | |
| on: | |
| schedule: | |
| - cron: "*/10 * * * *" # 每 10 分钟运行一次(临时高频,用于回扫历史存量,事后改回每日) | |
| workflow_dispatch: # 允许手动触发,便于首次启用时回扫历史 | |
| permissions: | |
| issues: write | |
| pull-requests: write | |
| concurrency: | |
| group: lock-threads | |
| cancel-in-progress: false # 不取消正在跑的,避免回扫中途中断 | |
| jobs: | |
| lock: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: dessant/lock-threads@v6 | |
| with: | |
| # 不设置 issue-comment / pr-comment:评论会通知所有历史参与者并触发邮件, | |
| # 仅靠 CONTRIBUTING 中的「Issue 流程」小节说明锁定策略即可。 | |
| issue-inactive-days: "30" | |
| issue-lock-reason: "resolved" | |
| pr-inactive-days: "30" | |
| pr-lock-reason: "resolved" |