Skip to content

Commit

Permalink
Attempt to escape commit messages in webhook calls, so they don't exp…
Browse files Browse the repository at this point in the history
…lode when they have quote characters in them, like this message does
  • Loading branch information
cmsj committed Dec 11, 2023
1 parent 747f664 commit a199654
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci_testbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
- name: Send notification (Push)
if: ${{ always() && github.event_name == 'push' && github.repository == 'hammerspoon/hammerspoon' }}
run: |
/usr/bin/curl -H "X-CI-WebHook: true" -H "Content-Type: application/json" -d '{"secret": "${{ secrets.CI_WEBHOOK_SECRET }}", "repository": "hammerspoon", "workflow": "CI (Push)", "message": "CI for ${{ github.event.compare }} (${{ github.event.head_commit.author.name }}):\n * ${{ github.event.head_commit.message}}\n * ${{ steps.test.outputs.test_result }}"}' "${{ secrets.CI_WEBHOOK_URL }}"
/usr/bin/curl -H "X-CI-WebHook: true" -H "Content-Type: application/json" -d '{"secret": "${{ secrets.CI_WEBHOOK_SECRET }}", "repository": "hammerspoon", "workflow": "CI (Push)", "message": "CI for ${{ github.event.compare }} (${{ github.event.head_commit.author.name }}):\n * ${{ toJSON(github.event.head_commit.message)}}\n * ${{ steps.test.outputs.test_result }}"}' "${{ secrets.CI_WEBHOOK_URL }}"
- name: Send notification (PR)
if: ${{ always() && github.event_name == 'pull_request' && github.repository == 'hammerspoon/hammerspoon' && env.CI_WEBHOOK_URL != '' }}
Expand Down

0 comments on commit a199654

Please sign in to comment.