mirror of
https://github.com/MustardChef/WSABuilds.git
synced 2024-11-10 21:55:11 +01:00
51 lines
1.3 KiB
YAML
51 lines
1.3 KiB
YAML
name: Anti-spam
|
|
|
|
on:
|
|
issues:
|
|
types: [opened]
|
|
pull_request:
|
|
types: [opened, edited]
|
|
|
|
jobs:
|
|
autoclose:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check issue
|
|
uses: dessant/repo-lockdown@v2
|
|
with:
|
|
exclude-issue-labels: |
|
|
bug
|
|
enhancement
|
|
issue-lock-reason: spam
|
|
exclude-pr-labels: |
|
|
bugfix
|
|
enhancement
|
|
do-not-autoclose
|
|
pr-labels: spam
|
|
pr-lock-reason: spam
|
|
skip-closed-pr-comment: true
|
|
skip-closed-issue-comment: true
|
|
process-only: issues
|
|
- name: Check pull request
|
|
uses: tachiyomiorg/issue-moderator-action@v1
|
|
with:
|
|
auto-close-rules: |
|
|
[
|
|
{
|
|
"type": "body",
|
|
"regex": ".*DELETE THIS SECTION IF YOU HAVE READ AND ACKNOWLEDGED IT.*",
|
|
"message": "The acknowledgment section was not removed."
|
|
}
|
|
]
|
|
auto-close-ignore-label: |
|
|
do-not-autoclose
|
|
bugfix
|
|
enhancement
|
|
- name: Delete workflow runs
|
|
uses: Mattraks/delete-workflow-runs@v2
|
|
with:
|
|
token: ${{ github.token }}
|
|
repository: ${{ github.repository }}
|
|
retain_days: 0
|
|
keep_minimum_runs: 0
|