From bfc2fad49f00e7b5b038e3368b548450876d2c74 Mon Sep 17 00:00:00 2001 From: Howard Wu <40033067+Howard20181@users.noreply.github.com> Date: Sun, 25 Sep 2022 12:26:20 +0800 Subject: [PATCH] Check whether the Pull Request is regulated (#142) --- .github/pull_request_template.md | 12 ++++++++++++ .github/workflows/pull_request_check.yml | 25 ++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/pull_request_check.yml diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..6afc729 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,12 @@ + + +Checklist + +- [ ] Referenced all related issues in the PR body (e.g. "Closes #xyz") +- [ ] Have tested the modifications diff --git a/.github/workflows/pull_request_check.yml b/.github/workflows/pull_request_check.yml new file mode 100644 index 0000000..36ccbbb --- /dev/null +++ b/.github/workflows/pull_request_check.yml @@ -0,0 +1,25 @@ +name: Pull Request checker + +on: + pull_request_target: + types: [opened, edited] + +jobs: + autoclose: + runs-on: ubuntu-latest + steps: + - 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 + bug + enhancement