Skip to content

Commit

Permalink
Merge pull request #17 from echoix/slash-cmd-ref
Browse files Browse the repository at this point in the history
Update slash-command-dispatch.yml
  • Loading branch information
echoix authored Apr 8, 2023
2 parents 4a7431f + 261ae1e commit 7a4f986
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/slash-command-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}`)
}
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 7a4f986

Please sign in to comment.