diff --git a/.github/workflows/slash-command-dispatch.yml b/.github/workflows/slash-command-dispatch.yml index b1dc130e66f..2b535d25822 100644 --- a/.github/workflows/slash-command-dispatch.yml +++ b/.github/workflows/slash-command-dispatch.yml @@ -24,7 +24,9 @@ jobs: core.info(`Getting PR #${request.pull_number} from ${request.owner}/${request.repo}`) try { const result = await github.rest.pulls.get(request) - return result.data + core.setOutput('head_ref', result.data.head.ref); + core.setOutput('head_repo_full_name', result.data.head.repo.full_name); + return result.data; } catch (err) { core.setFailed(`Request failed with error ${err}`) } @@ -34,10 +36,10 @@ jobs: run: echo "$GETPR_CONTEXT" - run: echo "$GETPR_REF" env: - GETPR_REF: ${{ steps.get-pr.outputs.result.head.ref }} + GETPR_REF: ${{ steps.get-pr.head_ref }} - run: echo "$GETPR_REPO" env: - GETPR_REPO: ${{ steps.get-pr.outputs.result.head.repo.full_name }} + GETPR_REPO: ${{ steps.get-pr.head_repo_full_name }} - name: Slash Command Dispatch PR uses: peter-evans/slash-command-dispatch@v3 id: scd @@ -54,8 +56,8 @@ jobs: comment-id=${{ github.event.comment.id }} issue-number=${{ github.event.issue.number }} actor=${{ github.actor }} - checkout-ref=${{ steps.get-pr.outputs.result.head.ref }} - checkout-repository=${{ steps.get-pr.outputs.result.head.repo.full_name }} + checkout-ref=${{ steps.get-pr.head_ref }} + checkout-repository=${{ steps.get-pr.head-repo_full_name }} - name: Edit comment with error message if: steps.scd.outputs.error-message uses: peter-evans/create-or-update-comment@v2