Skip to content

Slash Commands

Slash Commands #6

Workflow file for this run

name: Slash Commands
on:
issue_comment:
types: [created]
jobs:
slash_command:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Fetch issue info
uses: octokit/[email protected]
id: fetch-issue
with:
route: GET ${{ github.event.issue.url }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch PR info
uses: octokit/[email protected]
id: fetch-pr
with:
route: GET ${{ fromJson(steps.fetch-issue.outputs.data).pull_request.url }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Dispatch happo command
uses: peter-evans/slash-command-dispatch@v3
with:
token: ${{ secrets.PAT }}
issue-type: pull-request
dispatch-type: workflow
commands: |
test
static-args: |
current-sha=${{ fromJson(steps.fetch-pr.outputs.data).head.sha }}
pr-number=${{ fromJson(steps.fetch-issue.outputs.data).number }}
comment-id=${{ github.event.comment.id }}