Skip to content

Commit

Permalink
Fix invalid "quotes" and other chars in commit message breaking forma…
Browse files Browse the repository at this point in the history
…tting
  • Loading branch information
MatthewCane committed Jul 24, 2024
1 parent 42ab1a7 commit 8e9000b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ runs:
id: commit
env:
GH_TOKEN: ${{ inputs.github_token }}
run: echo message=$(gh api /repos/${{ github.repository }}/commits/${{ github.sha }} --jq '.commit.message' | head -1) >> "$GITHUB_OUTPUT"
run: echo message=$(gh api /repos/${{ github.repository }}/commits/${{ github.sha }} --jq '.commit.message' | head -1 | jq -Rrsc . ) >> "$GITHUB_OUTPUT"
# The head -1 is there to ensure multi-line commit messages don't break
# the formatting of the JSON payload as CR/LF control chars are unable
# to be escaped cleanly.
Expand Down

0 comments on commit 8e9000b

Please sign in to comment.