From 6818fdd00af224643ad6f1999f3aaaa6a894c297 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Wed, 14 May 2025 22:48:30 +0200 Subject: [PATCH 1/7] Add lock threads cron job --- .github/workflows/lock_threads.yml | 35 ++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/lock_threads.yml diff --git a/.github/workflows/lock_threads.yml b/.github/workflows/lock_threads.yml new file mode 100644 index 00000000..de74fa5e --- /dev/null +++ b/.github/workflows/lock_threads.yml @@ -0,0 +1,35 @@ +name: LockThreads + +on: + schedule: + - cron: "50 * * * *" + workflow_dispatch: + +permissions: + issues: write + pull-requests: write + +concurrency: + group: lock-threads + +jobs: + action: + runs-on: ubuntu-latest + steps: + - uses: dessant/lock-threads@v5 + with: + github-token: ${{ github.token }} + issue-inactive-days: 120 + issue-comment: > + This issue has been automatically locked since there has not been + any recent activity after it was closed. Please open a new issue + for related bugs or feature requests. + issue-lock-reason: "Resolved" + pr-inactive-days: 120 + pr-comment: > + This pull request thread has been automatically locked since there + has not been any recent activity after it was closed. Please open + an issue for any related bugs or feature requests. + pr-lock-reason: "Completed" + process-only: "issues. prs" + log-output: false From 44e901ab084e5561f06b0eb4f0ecdb34754c01dd Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Wed, 14 May 2025 22:50:01 +0200 Subject: [PATCH 2/7] Enable log output --- .github/workflows/lock_threads.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lock_threads.yml b/.github/workflows/lock_threads.yml index de74fa5e..0fd09259 100644 --- a/.github/workflows/lock_threads.yml +++ b/.github/workflows/lock_threads.yml @@ -32,4 +32,4 @@ jobs: an issue for any related bugs or feature requests. pr-lock-reason: "Completed" process-only: "issues. prs" - log-output: false + log-output: true From c0ac50a501cfc8f6a3612355a92a60b0ca580c01 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Wed, 14 May 2025 22:56:25 +0200 Subject: [PATCH 3/7] Fix lock threads job issues --- .github/workflows/lock_threads.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lock_threads.yml b/.github/workflows/lock_threads.yml index 0fd09259..e201d61c 100644 --- a/.github/workflows/lock_threads.yml +++ b/.github/workflows/lock_threads.yml @@ -2,7 +2,7 @@ name: LockThreads on: schedule: - - cron: "50 * * * *" + - cron: "0 * * * *" workflow_dispatch: permissions: @@ -24,12 +24,12 @@ jobs: This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or feature requests. - issue-lock-reason: "Resolved" + issue-lock-reason: "resolved" pr-inactive-days: 120 pr-comment: > This pull request thread has been automatically locked since there has not been any recent activity after it was closed. Please open an issue for any related bugs or feature requests. - pr-lock-reason: "Completed" - process-only: "issues. prs" + pr-lock-reason: "resolved" + process-only: "issue, pr" log-output: true From 6c20847cc97efefefe210cb045a9ac707726f1a0 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Wed, 14 May 2025 23:32:09 +0200 Subject: [PATCH 4/7] Change schedule to lock old threads once a day --- .github/workflows/lock_threads.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/lock_threads.yml b/.github/workflows/lock_threads.yml index e201d61c..b18f3387 100644 --- a/.github/workflows/lock_threads.yml +++ b/.github/workflows/lock_threads.yml @@ -2,8 +2,7 @@ name: LockThreads on: schedule: - - cron: "0 * * * *" - workflow_dispatch: + - cron: "0 1 * * *" permissions: issues: write From ca17263640797ee075e9225e499e7d24f2de57ac Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Thu, 15 May 2025 00:33:05 +0200 Subject: [PATCH 5/7] Disable lock thread comment to reduce notification spam --- .github/workflows/lock_threads.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/lock_threads.yml b/.github/workflows/lock_threads.yml index b18f3387..9c4a58fc 100644 --- a/.github/workflows/lock_threads.yml +++ b/.github/workflows/lock_threads.yml @@ -2,7 +2,7 @@ name: LockThreads on: schedule: - - cron: "0 1 * * *" + - cron: "35 0 * * *" permissions: issues: write @@ -19,16 +19,16 @@ jobs: with: github-token: ${{ github.token }} issue-inactive-days: 120 - issue-comment: > - This issue has been automatically locked since there has not been - any recent activity after it was closed. Please open a new issue - for related bugs or feature requests. + # issue-comment: > + # This issue has been automatically locked since there has not been + # any recent activity after it was closed. Please open a new issue + # for related bugs or feature requests. issue-lock-reason: "resolved" pr-inactive-days: 120 - pr-comment: > - This pull request thread has been automatically locked since there - has not been any recent activity after it was closed. Please open - an issue for any related bugs or feature requests. + # pr-comment: > + # This pull request thread has been automatically locked since there + # has not been any recent activity after it was closed. Please open + # an issue for any related bugs or feature requests. pr-lock-reason: "resolved" process-only: "issue, pr" log-output: true From a1aba9bed460efc03d28085b208ce320cb05a489 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Thu, 15 May 2025 00:36:38 +0200 Subject: [PATCH 6/7] Run on a hourly schedule for now --- .github/workflows/lock_threads.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lock_threads.yml b/.github/workflows/lock_threads.yml index 9c4a58fc..b1dd17a0 100644 --- a/.github/workflows/lock_threads.yml +++ b/.github/workflows/lock_threads.yml @@ -2,7 +2,7 @@ name: LockThreads on: schedule: - - cron: "35 0 * * *" + - cron: "40 * * * *" permissions: issues: write From 4c16e17d44176b9986b4cdab9acf08016bb8c7b0 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Thu, 15 May 2025 12:42:55 +0200 Subject: [PATCH 7/7] Change lock threads schedule to run only every 3 days --- .github/workflows/lock_threads.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/lock_threads.yml b/.github/workflows/lock_threads.yml index b1dd17a0..cf2c9deb 100644 --- a/.github/workflows/lock_threads.yml +++ b/.github/workflows/lock_threads.yml @@ -2,7 +2,7 @@ name: LockThreads on: schedule: - - cron: "40 * * * *" + - cron: "14 3 */3 * *" permissions: issues: write @@ -19,10 +19,10 @@ jobs: with: github-token: ${{ github.token }} issue-inactive-days: 120 - # issue-comment: > - # This issue has been automatically locked since there has not been - # any recent activity after it was closed. Please open a new issue - # for related bugs or feature requests. + issue-comment: > + This issue has been automatically locked since there has not been + any recent activity after it was closed. Please open a new issue + for related bugs or feature requests. issue-lock-reason: "resolved" pr-inactive-days: 120 # pr-comment: >