From dae94459816f4238ba59b8f6b7ff2f83768e33d7 Mon Sep 17 00:00:00 2001 From: Mykhailo Shevchuk Date: Sun, 26 Jul 2026 00:25:01 +0300 Subject: [PATCH] Add lock-threads workflow Lock closed issues and PRs after 14 days of inactivity, matching the setup in the Unleashed firmware repo. Runs daily at 03:00 UTC and can be kicked off by hand via workflow_dispatch. Locking is not closing: it only stops new comments on already-closed threads, and anyone can still open a fresh issue from the templates. The bot comment is reworded for this repo - it asks people to name the app they are hitting the problem in, since this tracker is per-app. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/lock-threads.yml | 50 ++++++++++++++++++++++++++++++ 1 file changed, 50 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..41b951d1 --- /dev/null +++ b/.github/workflows/lock-threads.yml @@ -0,0 +1,50 @@ +# Lock closed issues and PRs after a period of inactivity, so stale threads +# don't accumulate "me too" / necro comments that never reach a maintainer. +# Locking is not closing: it only stops new comments, and anyone can still open +# a fresh issue from the templates. The bot never auto-closes anything. +# +# Runs once a day (dessant recommends daily to keep resource use low) and can be +# kicked off by hand via workflow_dispatch. Each thread type only gets processed +# when its *-inactive-days is set, so issues and PRs are opted in explicitly below. + +name: Lock threads + +on: + schedule: + - cron: "0 3 * * *" # daily, 03:00 UTC (off-peak) + workflow_dispatch: + +# Locking edits issue/PR state; no code is checked out or executed. Everything +# unlisted is denied. +permissions: + issues: write + pull-requests: write + +# One sweep at a time; a manual run and the nightly cron shouldn't overlap. +concurrency: + group: lock-threads + cancel-in-progress: false + +jobs: + lock: + name: Lock inactive closed threads + runs-on: ubuntu-latest + steps: + - uses: dessant/lock-threads@v6 + with: + issue-inactive-days: "14" + pr-inactive-days: "14" + # This tracker is per-app, so point people at naming the app rather + # than at the firmware version (see .github/ISSUE_TEMPLATE). + issue-comment: > + This issue has been automatically locked since there has been no + activity for a while after it was closed. If you're hitting the same + problem, please open a new issue naming the app it affects and how + to reproduce it. + pr-comment: > + This pull request has been automatically locked since there has been + no activity for a while after it was closed. If you'd like to pick + this up, please open a new pull request for the app. + # Default reason "resolved" fits closed-then-idle threads. + issue-lock-reason: resolved + pr-lock-reason: resolved