From ac8953f4c83753605018aaca1e5659503aea887d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Tue, 4 Apr 2023 19:10:32 -0400 Subject: [PATCH 1/2] Update slash-command-dispatch.yml Add checkout-ref and checkout-repository --- .github/workflows/slash-command-dispatch.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/slash-command-dispatch.yml b/.github/workflows/slash-command-dispatch.yml index aefa04f2f34..1eb893b1689 100644 --- a/.github/workflows/slash-command-dispatch.yml +++ b/.github/workflows/slash-command-dispatch.yml @@ -21,6 +21,8 @@ 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 From 74ac9da0c9be3565cc00fa4d4a252d14f02ebec5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Tue, 4 Apr 2023 19:21:57 -0400 Subject: [PATCH 2/2] Update build-command.yml Add checkout-ref and checkout-repository inputs --- .github/workflows/build-command.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-command.yml b/.github/workflows/build-command.yml index 16b8ebf4af6..affdd63bf9b 100644 --- a/.github/workflows/build-command.yml +++ b/.github/workflows/build-command.yml @@ -18,6 +18,12 @@ 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: @@ -51,8 +57,8 @@ jobs: - uses: actions/checkout@v3 with: token: ${{ secrets.PAT }} - repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }} - ref: ${{ github.event.client_payload.pull_request.head.ref }} + repository: ${{ github.event.inputs.checkout-repository }} + ref: ${{ github.event.inputs.checkout-ref }} - name: Setup Python uses: actions/setup-python@v4.5.0 with: