-
Notifications
You must be signed in to change notification settings - Fork 3k
37 lines (34 loc) · 1.52 KB
/
slash-command-dispatch.yaml
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
name: Slash Command Dispatch
env:
REPO_OWNER: "${{ vars.REPO_OWNER }}"
REPO_NAME: "${{ vars.REPO_NAME }}"
GITHUB_TOKEN: "${{ secrets.PAT }}"
on:
issue_comment:
types: [created]
pull_request:
types: [ closed ]
jobs:
checkAutomatedPR:
if: ${{ github.actor != 'dependabot[bot]' && !github.event.pull_request.head.repo.fork && github.event.issue.pull_request && (contains(github.event.comment.body, '/package') || contains(github.event.comment.body, '/Package')) }}
uses: ./.github/workflows/checkAutomatedPR.yaml
pullRequestStatus:
needs: checkAutomatedPR
if: ${{ github.actor != 'dependabot[bot]' && !github.event.pull_request.head.repo.fork && github.event.issue.pull_request && (contains(github.event.comment.body, '/package') || contains(github.event.comment.body, '/Package')) }}
uses: ./.github/workflows/pullRequestStatus.yaml
slashCommandDispatch:
runs-on: ubuntu-latest
needs: [pullRequestStatus, checkAutomatedPR]
if: ${{ needs.pullRequestStatus.outputs.isPullRequestMerged == 'False' && needs.checkAutomatedPR.outputs.isAutomatedPR == 'False' && !github.event.pull_request.head.repo.fork}}
steps:
- name: Slash Command Dispatch
uses: peter-evans/slash-command-dispatch@67dfeb76529b35541a7c536976cba367cd2d364b
with:
token: ${{ env.GITHUB_TOKEN }}
commands: |
package
Package
PACKAGE
repository: ${{env.REPO_OWNER}}/${{env.REPO_NAME}}
issue-type: pull-request
reactions: false