From f7d2151607c14cbdee992006df883ade56cea9c3 Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Mon, 7 Apr 2025 22:12:13 +0900 Subject: [PATCH] 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 --- .github/workflows/lock-threads.yml | 37 ++++++++++++++++++++++++++++++ LICENSES/MIT.txt | 18 +++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 .github/workflows/lock-threads.yml create mode 100644 LICENSES/MIT.txt diff --git a/.github/workflows/lock-threads.yml b/.github/workflows/lock-threads.yml new file mode 100644 index 000000000..d05464fd7 --- /dev/null +++ b/.github/workflows/lock-threads.yml @@ -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' diff --git a/LICENSES/MIT.txt b/LICENSES/MIT.txt new file mode 100644 index 000000000..fc2cf8e6b --- /dev/null +++ b/LICENSES/MIT.txt @@ -0,0 +1,18 @@ +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and +associated documentation files (the "Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO +EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +USE OR OTHER DEALINGS IN THE SOFTWARE.