name: Openresty patches review companion
on:
  pull_request:
    paths:
    - 'build/openresty/patches/**'

jobs:
  create-pr:
    runs-on: ubuntu-latest
    steps:
      - name: Dispatch the workflow
        if: ${{ github.repository_owner == 'Kong' }}
        uses: benc-uk/workflow-dispatch@31e2b3319479a63f0ab15bf800eff9e913504e26 # v1.3.2
        with:
          workflow: create-pr.yml
          repo: kong/openresty-patches-review
          ref: master
          token: ${{ secrets.PAT }}
          inputs: |
            {"pr-branch":"${{ github.event.pull_request.head.repo.owner.login }}:${{ github.head_ref }}", "pr-base":"${{ github.base_ref }}", "ee":${{ contains(github.repository, 'kong-ee') && 'true' || 'false' }}, "pr-id":"${{ github.event.pull_request.number }}"}

