Fix the escaping of commit message in the stackbrew pr script
Switch to using sed as a safer approach
This commit is contained in:
parent
2ecc9e8579
commit
bfc5832ca6
|
@ -84,8 +84,7 @@ function message() {
|
|||
|
||||
function pr_payload() {
|
||||
local escaped_message
|
||||
IFS=' ' read -ra escaped_message <<< "$COMMIT_MESSAGE"
|
||||
escaped_message="$(printf '%q ' "${escaped_message[@]}")"
|
||||
escaped_message="$(echo "$COMMIT_MESSAGE" | sed -E -e "s/\"/\\\\\"/g")"
|
||||
echo '{
|
||||
"title": "Node: '"$escaped_message"'",
|
||||
"body": "Commit: nodejs/docker-node@'"$COMMIT_ID"'",
|
||||
|
|
Loading…
Reference in New Issue