-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (41 loc) · 1.28 KB
/
command-dispatch.yml
File metadata and controls
46 lines (41 loc) · 1.28 KB
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
name: Command Management
on:
issue_comment:
types: [created, edited]
jobs:
# Automatically reverts commits on request
profanityCheck:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Profanity check step
if: ${{env.checkProfanity}} == true
uses: tailaiw/mind-your-language-action@v1.0.3
env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
continue-on-error: true
slashCommandDispatch:
if: github.event.action == 'created'
runs-on: ubuntu-latest
steps:
- name: Get Configurations
uses: ./variable-mastermind/
with:
settings: ${{ secrets.SETTINGS }}
mode: 'environment'
token: ${{ secrets.GITHUB_TOKEN }}
# Advanced JSON configuration
- name: Slash Command Dispatch (JSON)
id: scd
uses: peter-evans/slash-command-dispatch@v2.1.3
with:
token: ${{ secrets.BOT_TOKEN }}
config: ${{env.command_settings}}
- name: Edit comment with error message
if: steps.scd.outputs.error-message
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ github.event.comment.id }}
body: |
> ${{ steps.scd.outputs.error-message }}