diff --git a/.github/workflows/build-command.yml b/.github/workflows/build-command.yml index affdd63bf9b..eee50fd262f 100644 --- a/.github/workflows/build-command.yml +++ b/.github/workflows/build-command.yml @@ -18,12 +18,6 @@ on: actor: description: "The user who executed the slash command" required: true - checkout-ref: - description: "The reference to pass to 'ref' to checkout action" - required: true - checkout-repository: - description: "The repository to pass to 'repository' to tcheckout action" - required: true repository_dispatch: types: [build-command] jobs: @@ -53,12 +47,16 @@ jobs: env: PAYLOAD_CONTEXT: ${{ toJson(github.event.client_payload) }} run: echo "$PAYLOAD_CONTEXT" + - name: Dump the inputs payload context + env: + INPUTS_CONTEXT: ${{ toJson(github.event.inputs) }} + run: echo "$INPUTS_CONTEXT" # Checkout the pull request branch - uses: actions/checkout@v3 with: token: ${{ secrets.PAT }} - repository: ${{ github.event.inputs.checkout-repository }} - ref: ${{ github.event.inputs.checkout-ref }} + repository: ${{ github.event.inputs.repository }} + ref: refs/pull/${{ github.event.inputs.issue-number }}/head - name: Setup Python uses: actions/setup-python@v4.5.0 with: diff --git a/.github/workflows/slash-command-dispatch.yml b/.github/workflows/slash-command-dispatch.yml index 1eb893b1689..714e9e94c33 100644 --- a/.github/workflows/slash-command-dispatch.yml +++ b/.github/workflows/slash-command-dispatch.yml @@ -6,9 +6,10 @@ jobs: slashCommandDispatch: runs-on: ubuntu-latest steps: - - name: Slash Command Dispatch + - name: Slash Command Dispatch PR uses: peter-evans/slash-command-dispatch@v3 id: scd + if: github.event.issue.pull_request with: token: ${{ secrets.PAT }} commands: | @@ -21,8 +22,6 @@ jobs: comment-id=${{ github.event.comment.id }} issue-number=${{ github.event.issue.number }} actor=${{ github.actor }} - checkout-ref=${{ github.event.pull_request.head.ref }} - checkout-repository=${{ github.event.pull_request.head.repo.full_name }} - name: Edit comment with error message if: steps.scd.outputs.error-message uses: peter-evans/create-or-update-comment@v2