ci: Fix issue moderation

This commit is contained in:
ziro 2024-02-03 09:51:07 +07:00
parent bc56c8127e
commit f9ca046abb
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6

View file

@ -1,13 +1,26 @@
name: Issue closer name: Issue moderator
on: [issues]
on:
issues:
types: [ opened, edited, reopened ]
issue_comment:
types: [ created ]
jobs: jobs:
autoclose: autoclose:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Autoclose issue - name: Moderate issues
uses: arkon/issue-closer-action@v1.0 uses: keiyoushi/issue-moderator-action@a017be83547db6e107431ce7575f53c1dfa3296a # v2
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.ISSUE_MODERATION_PAT }}
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." auto-close-rules: |
issue-title-pattern: ".*Write short description here.*" [
issue-body-pattern: ".*DELETE THIS SECTION IF YOU HAVE READ AND ACKNOWLEDGED IT.*" {
"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