Skip to content

Commit

Permalink
Using curl --data-urlencode
Browse files Browse the repository at this point in the history
  • Loading branch information
datapythonista committed Jan 27, 2024
1 parent 98c436f commit d7929aa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ runs:
- name: "Call Doc Previewer Webhook"
shell: bash
env:
PREVIEWER_URL: "${{ inputs.server }}/preview/${{ github.repository }}/${{ github.event.issue.number }}?job=${{ inputs.job }}"
PREVIEWER_URL: "${{ inputs.server }}/preview/${{ github.repository }}/${{ github.event.issue.number }}"
ADD_COMMENT_URL: "https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments"
GITHUB_TOKEN: "${{ inputs.token }}"
ARTIFACT_JOB: "${{ inputs.job }}"
run: |
PREVIEWER_RESPONSE=$(curl -X POST "${PREVIEWER_URL}")
PREVIEWER_RESPONSE=$(curl -X POST --data-urlencode="job=${JOB}" ${PREVIEWER_URL})
if [[ $? ]]; then
curl -H "Authorization: token ${GITHUB_TOKEN}" \
-d '{"body": "${PREVIEWER_RESPONSE}"}' \
Expand Down

0 comments on commit d7929aa

Please sign in to comment.