-
Notifications
You must be signed in to change notification settings - Fork 5
42 lines (36 loc) · 1.21 KB
/
slash_command_dispatch.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
name: Slash Command Dispatch
on:
issue_comment:
types: [created]
env:
AIRBYTE_ANALYTICS_ID: ${{ vars.AIRBYTE_ANALYTICS_ID }}
jobs:
slashCommandDispatch:
# Only allow slash commands on pull request (not on issues)
if: ${{ github.event.issue.pull_request }}
runs-on: ubuntu-latest
steps:
- name: Slash Command Dispatch
id: dispatch
uses: peter-evans/slash-command-dispatch@v4
with:
repository: ${{ github.repository }}
token: ${{ secrets.GH_PAT_MAINTENANCE_OCTAVIA }}
dispatch-type: workflow
issue-type: pull-request
commands: |
fix-pr
test-pr
poetry-lock
static-args: |
pr=${{ github.event.issue.number }}
comment-id=${{ github.event.comment.id }}
# Only run for users with 'write' permission on the main repository
permission: write
- name: Edit comment with error message
if: steps.dispatch.outputs.error-message
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ github.event.comment.id }}
body: |
> Error: ${{ steps.dispatch.outputs.error-message }}