diff --git a/.github/lock.yml b/.github/lock.yml deleted file mode 100644 index c80c7a0a09968d5..000000000000000 --- a/.github/lock.yml +++ /dev/null @@ -1,6 +0,0 @@ -# Configuration for lock-threads - https://github.com/dessant/lock-threads - -# Number of days of inactivity before a closed issue or pull request is locked -daysUntilLock: 30 -# Comment to post before locking. Set to `false` to disable -lockComment: 'This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please open a new issue with a reproduction. Thank you.' diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml new file mode 100644 index 000000000000000..4345bb37d37dc1e --- /dev/null +++ b/.github/workflows/lock.yml @@ -0,0 +1,24 @@ +name: 'Lock Threads' + +on: + schedule: + # This runs every hour: https://crontab.guru/every-1-hour + - cron: '0 * * * *' + workflow_dispatch: + +permissions: + issues: write + pull-requests: write + +concurrency: + group: lock + +jobs: + action: + runs-on: ubuntu-latest + steps: + - uses: dessant/lock-threads@v3 + github-token: ${{ secrets.LOCK_TOKEN }} + issue-inactive-days: 30 + issue-comment: 'This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.' + pr-inactive-days: 30 diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 2a796174ce46eaf..1cbbfceb7cc5ca7 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -2,6 +2,7 @@ name: 'Stale issue handler' on: workflow_dispatch: schedule: + # This runs every day 20 minutes before midnight: https://crontab.guru/#40_23_*_*_* - cron: '40 23 * * *' jobs: @@ -12,6 +13,7 @@ jobs: id: stale name: 'Close stale issues with no reproduction' with: + repo-token: ${{ secrets.STALE_TOKEN }} only-labels: 'please add a complete reproduction' close-issue-message: 'This issue has been automatically closed after 30 days of inactivity with no reproduction. If you are running into a similar issue, please open a new issue with a reproduction. Thank you.' days-before-issue-close: 1 @@ -19,3 +21,4 @@ jobs: days-before-pr-close: -1 days-before-pr-stale: -1 exempt-issue-labels: 'blocked,must,should,keep' + operation-per-run: 300 # 1 operation per 100 issues, the rest is to label/comment/close