From 75f0936c53baf097688944d5e3573804880440d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Fri, 28 Mar 2025 15:51:25 +0100 Subject: [PATCH] Add workflow for locking old issues (#3980) To avoid necroposting to old issues that's usually left unnoticed, add workflow for locking issues similar to the one that Core has. The PR locking limit can be increased as the traffic is much lower compared to Core. Issues before 2025 have been locked manually via the API. --- .github/workflows/lock.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/lock.yml diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml new file mode 100644 index 000000000..896188ce9 --- /dev/null +++ b/.github/workflows/lock.yml @@ -0,0 +1,20 @@ +name: Lock + +on: + schedule: + - cron: "0 * * * *" + +jobs: + lock: + if: github.repository_owner == 'home-assistant' + runs-on: ubuntu-latest + steps: + - uses: dessant/lock-threads@v5.0.1 + with: + github-token: ${{ github.token }} + issue-inactive-days: "30" + exclude-issue-created-before: "2025-01-01T00:00:00Z" + issue-lock-reason: "" + pr-inactive-days: "7" + exclude-pr-created-before: "2025-01-01T00:00:00Z" + pr-lock-reason: ""