From 8a8c785a31711d9d1fa28008ac3f364f76c4e95b Mon Sep 17 00:00:00 2001 From: Zakhar Timoshenko Date: Thu, 30 Jun 2022 18:40:31 +0300 Subject: [PATCH] Add issue moderator action --- .github/ISSUE_TEMPLATE/config.yml | 2 +- .github/workflows/issue_moderator.yml | 29 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/issue_moderator.yml diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index b6d4254a1..c7cc0c855 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,5 @@ blank_issues_enabled: false contact_links: - name: ⚠️ Source issue - url: https://github.com/nv95/kotatsu-parsers/issues/new + url: https://github.com/KotatsuApp/kotatsu-parsers/issues/new about: Issues and requests for sources should be opened in the kotatsu-parsers repository instead \ No newline at end of file diff --git a/.github/workflows/issue_moderator.yml b/.github/workflows/issue_moderator.yml new file mode 100644 index 000000000..ef256ed06 --- /dev/null +++ b/.github/workflows/issue_moderator.yml @@ -0,0 +1,29 @@ +name: Issue moderator + +on: + issues: + types: [opened, edited, reopened] + issue_comment: + types: [created] + +jobs: + moderate: + runs-on: ubuntu-latest + steps: + - name: Moderate issues + uses: tachiyomiorg/issue-moderator-action@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + auto-close-rules: | + [ + { + "type": "body", + "regex": ".*DELETE THIS SECTION IF YOU HAVE READ AND ACKNOWLEDGED IT.*", + "message": "The acknowledgment section was not removed." + }, + { + "type": "body", + "regex": ".*\\* (Kotatsu version|Android version|Device): \\?.*", + "message": "Requested information in the template was not filled out." + } + ] \ No newline at end of file