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
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