Last active
May 19, 2020 06:37
-
-
Save mumoshu/1dedc99bf4c2c0324d818d112f871827 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pull Request ChatOps Template | |
on: | |
# https://help.github.com/en/articles/events-that-trigger-workflows#issue-comment-event-issue_comment | |
issue_comment: | |
types: [created] | |
jobs: | |
example: | |
name: Example ChatOps command | |
runs-on: ubuntu-latest | |
steps: | |
# Get pull request that the slash comment has been added | |
- uses: actions/checkout@v1 | |
with: | |
ref: refs/pull/${{ github.event.issue.number }}/head | |
- if: startsWith(github.event.comment.body, '/mycommand') | |
env: | |
PR_NUM: ${{ github.event.issue.number }} | |
run: | | |
.${{ github.event.comment.body }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment