name: Dispatch Command

on:
  issue_comment:
    types: [created]

permissions:
  contents: read

jobs:
  dispatch-command:
    if: startsWith(github.repository, 'Homebrew/')
    runs-on: ubuntu-latest
    steps:
      - name: Dispatch /rebase Command
        uses: peter-evans/slash-command-dispatch@13bc09769d122a64f75aa5037256f6f2d78be8c4
        with:
          token: ${{ secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN }}
          reaction-token: ${{ secrets.HOMEBREW_GITHUB_PUBLIC_REPO_TOKEN }}
          commands: rebase
          permission: triage
          issue-type: pull-request
