-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (46 loc) · 1.55 KB
/
slash-command-dispatch.yml
File metadata and controls
49 lines (46 loc) · 1.55 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
47
48
49
name: Slash Command Dispatch
on:
issue_comment:
# Type "edited" added here for test purposes. Where possible, avoid
# using to prevent processing unnecessary events.
types: [created, edited]
jobs:
slashCommandDispatch:
runs-on: ubuntu-latest
steps:
# Checkout is necessary here due to referencing a local action.
# It's also necessary when using the 'config-from-file' option.
# Otherwise, avoid using checkout to keep this workflow fast.
# - uses: actions/checkout@v4
# # Basic configuration
# - name: Slash Command Dispatch
# uses: ./
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# commands: |
# render
# permission: none
# issue-type: issue
# Advanced JSON configuration
- name: Slash Command Dispatch (JSON)
id: scd
uses: peter-evans/slash-command-dispatch@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
config: >
[
{
"command": "help",
"permission": "none",
"issue_type": "pull-request",
"repository": "PDAL/slash-command-dispatch-processor",
"event_type_suffix": "-pr-command"
}
]
- name: Edit comment with error message
if: steps.scd.outputs.error-message
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ github.event.comment.id }}
body: |
> ${{ steps.scd.outputs.error-message }}