diff --git a/.github/workflows/issue_closer.yml b/.github/workflows/issue_closer.yml index bf70595317..ddf7c9dcb6 100644 --- a/.github/workflows/issue_closer.yml +++ b/.github/workflows/issue_closer.yml @@ -1,13 +1,26 @@ -name: Issue closer -on: [issues] +name: Issue moderator + +on: + issues: + types: [ opened, edited, reopened ] + issue_comment: + types: [ created ] + jobs: autoclose: runs-on: ubuntu-latest steps: - - name: Autoclose issue - uses: arkon/issue-closer-action@v1.0 + - name: Moderate issues + uses: keiyoushi/issue-moderator-action@a017be83547db6e107431ce7575f53c1dfa3296a # v2 with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - issue-close-message: "@${issue.user.login} this issue was automatically closed because it was not filled in correctly or the acknowledgment section was not removed." - issue-title-pattern: ".*Write short description here.*" - issue-body-pattern: ".*DELETE THIS SECTION IF YOU HAVE READ AND ACKNOWLEDGED IT.*" + repo-token: ${{ secrets.ISSUE_MODERATION_PAT }} + auto-close-rules: | + [ + { + "type": "body", + "regex": "- \\[[xX]\\] II have admitted that I am a clown by having checked this box, as I have not read these acknowledgements\\.", + "labels": [":clown_face:"], + "message": "You have not carefully read the acknowledgements." + } + ] + auto-close-ignore-label: do-not-autoclose