Add lock-threads.yml

The action will be used to lock issues and PRs to prevent necro-posting on closed ones which have not had any activity in the past year.

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
This commit is contained in:
Suguru Hirahara
2025-04-07 22:12:13 +09:00
committed by Slavi Pantaleev
parent 5b7d8f4d42
commit f7d2151607
2 changed files with 55 additions and 0 deletions

37
.github/workflows/lock-threads.yml vendored Normal file
View File

@ -0,0 +1,37 @@
# SPDX-FileCopyrightText: 2017 - 2023 Armin Sebastian
#
# SPDX-License-Identifier: MIT
---
name: 'Lock Threads'
on: # yamllint disable-line rule:truthy
# Use this to do a dry run from a pull request
# pull_request:
schedule:
- cron: '0 * * * *'
workflow_dispatch:
permissions:
issues: write
pull-requests: write
concurrency:
group: lock-threads
jobs:
action:
if: github.repository == 'spantaleev/matrix-docker-ansible-deploy'
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v5
with:
add-issue-labels: 'outdated'
issue-comment: >
This issue is locked to prevent necro-posting on closed
issues. Please create a new issue or contact the team members
on Matrix if the problem persists.
pr-comment: >
This pull request has been automatically locked since there
has not been any recent activity after it was closed.
Please open a new issue for related bugs.
process-only: 'issues, prs'