-
Notifications
You must be signed in to change notification settings - Fork 20
49 lines (42 loc) · 1.49 KB
/
issue_invalid.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Close invalid issues
on:
issues:
types: [opened]
jobs:
close-issues:
runs-on: ubuntu-latest
if: contains(github.event.issue.body, 'Error Compiling Codes') == true
permissions:
issues: write
steps:
- name: Detect code from mod
uses: KyoriPowered/action-regex-match@v4
id: regex-match
with:
text: ${{ github.event.issue.body }}
regex: '-\s+?(?<mod>.+?)\\(?<code>.+)'
- name: Create comment
uses: actions-cool/issues-helper@v3
if: ${{ steps.regex-match.outputs.match != '' }}
with:
actions: 'create-comment'
body: |
This issue was caused by a mod and not by a code from this repository.
As a quick troubleshoot, make sure your codes are up to date by going to the Codes tab and clicking Download/Update Community Codes.
If this issue still persists after that, then contact the author(s) of the mod.
- name: Add invalid label
uses: actions-cool/issues-helper@v3
if: ${{ steps.regex-match.outputs.match != '' }}
with:
actions: 'add-labels'
labels: 'invalid'
- name: Close issue
uses: actions-cool/issues-helper@v3
if: ${{ steps.regex-match.outputs.match != '' }}
with:
actions: 'close-issue'
- name: Lock issue
uses: actions-cool/issues-helper@v3
if: ${{ steps.regex-match.outputs.match != '' }}
with:
actions: 'lock-issue'