Skip to content

Commit 13f611d

Browse files
Merge pull request #1 from magna-z/bugfix
Add double quotes escaping in git message
2 parents 2243b68 + 1f2039f commit 13f611d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

assets/helpers/git.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ add_pullrequest_metadata_commit() {
6666
local author_date=$(git log $filter --format=format:%ai)
6767
local committer=$(git log $filter --format=format:%cn)
6868
local committer_date=$(git log $filter --format=format:%ci)
69-
local message=$(git log $filter --format=format:%B)
69+
local message=$(git log $filter --format=format:%B | sed 's/\"/\\"/g')
7070

7171
local metadata=""
7272
metadata+="{name: \"($1) commit\", value: \"${commit}\"},"

assets/in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,5 +138,5 @@ git config --add pullrequest.merge $ref
138138

139139
jq -n "{
140140
version: $(jq '.version' < "$payload"),
141-
metadata: $(pullrequest_metadata "$prq_id" "$uri" )
141+
metadata: $(pullrequest_metadata "$prq_id" "$uri")
142142
}" >&3

assets/out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,5 +185,5 @@ jq -n "{
185185
hash: \"$prq_hash\",
186186
date: \"$(date_from_epoch_seconds "$prq_verify_date")\"
187187
},
188-
metadata: $(pullrequest_metadata "$prq_number" "$uri" )
188+
metadata: $(pullrequest_metadata "$prq_number" "$uri")
189189
}" >&3

0 commit comments

Comments
 (0)