From 4dbee04f45817a34add3545bf0747ad6cd644aab Mon Sep 17 00:00:00 2001 From: Garrick Aden-Buie Date: Fri, 14 Jul 2023 16:49:22 -0400 Subject: [PATCH 1/2] ci(lock-threads): Automatically lock closed, inactive issues --- .github/workflows/lock-threads.yaml | 38 +++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/lock-threads.yaml diff --git a/.github/workflows/lock-threads.yaml b/.github/workflows/lock-threads.yaml new file mode 100644 index 000000000..485c6bcd0 --- /dev/null +++ b/.github/workflows/lock-threads.yaml @@ -0,0 +1,38 @@ +name: 'Lock Threads' + +on: + schedule: + - cron: '42 5 * * *' # 5:42 AM UTC every day + workflow_dispatch: + +permissions: + issues: write + # Enable the line below if you turn on pull request locking + # pull-requests: write + +concurrency: + group: lock-threads + +jobs: + action: + runs-on: ubuntu-latest + steps: + - uses: dessant/lock-threads@v4 + with: + # Remove the line below to turn on pull request locking + process-only: 'issues' + + # Issue-locking options + issue-inactive-days: 60 + issue-comment: > + This issue has been automatically locked. If you believe you have + found a related problem, please open a new issue (with + [a reprex](https://reprex.tidyverse.org/)) and link to this issue. + + # Pull request-locking options + pr-inactive-days: 60 + pull-comment: > + This pull request has been automatically locked. If you believe + you have found a related problem, please open a new issue + (with [a reprex](https://reprex.tidyverse.org/)) and link to this + pull request. From 195902428b81c531f8bc863cb71d0faaa42819c3 Mon Sep 17 00:00:00 2001 From: Garrick Aden-Buie Date: Mon, 17 Jul 2023 10:52:03 -0400 Subject: [PATCH 2/2] feat: Use shared lock-threads workflow --- .github/workflows/lock-threads.yaml | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/.github/workflows/lock-threads.yaml b/.github/workflows/lock-threads.yaml index 485c6bcd0..50f11078d 100644 --- a/.github/workflows/lock-threads.yaml +++ b/.github/workflows/lock-threads.yaml @@ -1,8 +1,9 @@ -name: 'Lock Threads' +name: 'Lock Closed Threads' on: schedule: - - cron: '42 5 * * *' # 5:42 AM UTC every day + - cron: '42 5 * * 1' # 5:42 AM UTC every Monday + repository_dispatch: { types: [lock_threads] } workflow_dispatch: permissions: @@ -14,25 +15,5 @@ concurrency: group: lock-threads jobs: - action: - runs-on: ubuntu-latest - steps: - - uses: dessant/lock-threads@v4 - with: - # Remove the line below to turn on pull request locking - process-only: 'issues' - - # Issue-locking options - issue-inactive-days: 60 - issue-comment: > - This issue has been automatically locked. If you believe you have - found a related problem, please open a new issue (with - [a reprex](https://reprex.tidyverse.org/)) and link to this issue. - - # Pull request-locking options - pr-inactive-days: 60 - pull-comment: > - This pull request has been automatically locked. If you believe - you have found a related problem, please open a new issue - (with [a reprex](https://reprex.tidyverse.org/)) and link to this - pull request. + lock-threads: + uses: rstudio/shiny-workflows/.github/workflows/lock-threads.yaml@v1