Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.