Skip to content

Commit

Permalink
fix: use github action instead of bot (#33718)
Browse files Browse the repository at this point in the history
* fix: use github action instead of bot

* add personal access tokens to avoid rate limiting

* Update .github/workflows/lock.yml

Co-authored-by: Steven <steven@ceriously.com>

* add cron comments

Co-authored-by: Steven <steven@ceriously.com>
  • Loading branch information
balazsorban44 and styfle committed Jan 27, 2022
1 parent eaf680d commit 4916aa1
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 6 deletions.
6 changes: 0 additions & 6 deletions .github/lock.yml

This file was deleted.

24 changes: 24 additions & 0 deletions .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
3 changes: 3 additions & 0 deletions .github/workflows/stale.yml
Expand Up @@ -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:
Expand All @@ -12,10 +13,12 @@ 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
days-before-issue-stale: 30
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

0 comments on commit 4916aa1

Please sign in to comment.