From 6688e277872ad3027d0633a9fcba0286a1896691 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Thu, 4 Mar 2021 21:40:35 +0800 Subject: [PATCH] Improve the pattern of issue bot --- .github/workflows/issue-pr-interceptor.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/issue-pr-interceptor.yml b/.github/workflows/issue-pr-interceptor.yml index 0dbc1c9..c46d79b 100644 --- a/.github/workflows/issue-pr-interceptor.yml +++ b/.github/workflows/issue-pr-interceptor.yml @@ -1,6 +1,10 @@ name: "Intercept bad issue/PRs" -on: [issues, pull_request] +on: + issues: + types: [opened] + pull_request: + types: [opened] jobs: autoclose: @@ -10,7 +14,7 @@ jobs: uses: roots/issue-closer@v1.1 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - issue-pattern: "\\[x\\] I have read" + issue-pattern: "(\\[x\\]|\\[X\\]) I have read" issue-close-message: ":wave: Hi @${issue.user.login},\n\nThis issue is being automatically closed because it does not follow the issue template." - pr-pattern: "\\[x\\] Bug|\\[x\\] New feat|\\[x\\] Break|\\[x\\] Doc|@dependabot" + pr-pattern: "(\\[x\\]|\\[X\\]) (Bug fix|New feature|Breaking change|Documentation update)|@dependabot" pr-close-message: ":wave: Hi @${pull_request.user.login},\n\nThis PR is being automatically closed because it does not follow the PR template."