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.
This commit is contained in:
Jan Čermák 2025-03-28 15:51:25 +01:00 committed by GitHub
parent 2f0ffbe443
commit 75f0936c53
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

20
.github/workflows/lock.yml vendored Normal file
View File

@ -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: ""