From baeaed55fd1e1a75955435f14201114702c03eef Mon Sep 17 00:00:00 2001 From: Howard Wu <40033067+Howard20181@users.noreply.github.com> Date: Sun, 25 Sep 2022 13:08:30 +0800 Subject: [PATCH] Update anti-spam workflows --- .github/pull_request_template.md | 1 - .github/workflows/anti_spam.yml | 18 +++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 1acb2c8..6eda463 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -3,7 +3,6 @@ Also make sure you've tested your code and also done a self-review of it. DELETE THIS SECTION IF YOU HAVE READ AND ACKNOWLEDGED IT. - Please set the label to bugfix or enhancement, otherwise it will be closed. --> Checklist diff --git a/.github/workflows/anti_spam.yml b/.github/workflows/anti_spam.yml index e6f7372..9b71277 100644 --- a/.github/workflows/anti_spam.yml +++ b/.github/workflows/anti_spam.yml @@ -10,7 +10,7 @@ jobs: autoclose: runs-on: ubuntu-latest steps: - - name: Anti-spam + - name: Check issue uses: dessant/repo-lockdown@v2 with: exclude-issue-labels: | @@ -25,6 +25,22 @@ jobs: pr-lock-reason: spam skip-closed-pr-comment: true skip-closed-issue-comment: true + process-only: issues + - name: Check pull request + uses: tachiyomiorg/issue-moderator-action@v1 + with: + auto-close-rules: | + [ + { + "type": "body", + "regex": ".*DELETE THIS SECTION IF YOU HAVE READ AND ACKNOWLEDGED IT.*", + "message": "The acknowledgment section was not removed." + } + ] + auto-close-ignore-label: | + do-not-autoclose + bugfix + enhancement - name: Delete workflow runs uses: Mattraks/delete-workflow-runs@v2 with: