@@ -47,13 +47,19 @@ add_pullrequest_metadata_basic() {
47
47
local commit=$( git rev-parse HEAD)
48
48
local author=$( git log -1 --format=format:%an)
49
49
50
- jq " . + [
51
- {name: \" id\" , value: \" ${1} \" },
52
- {name: \" title\" , value: \" ${title} \" },
53
- {name: \" author\" , value: \" ${author} \" },
54
- {name: \" commit (merged source in target)\" , value: \" ${commit} \" },
55
- {name: \" repository\" , value: \" ${2} \" }
56
- ]"
50
+ jq \
51
+ --arg id " $1 " \
52
+ --arg title " $title " \
53
+ --arg author " $author " \
54
+ --arg commit " $commit " \
55
+ --arg repository " $2 " \
56
+ ' . + [
57
+ {name: "id", value: $id},
58
+ {name: "title", value: $title},
59
+ {name: "author", value: $author},
60
+ {name: "commit (merged source in target)", value: $commit},
61
+ {name: "repository", value: $repository}
62
+ ]'
57
63
}
58
64
59
65
add_pullrequest_metadata_commit () {
@@ -66,7 +72,7 @@ add_pullrequest_metadata_commit() {
66
72
local author_date=$( git log $filter --format=format:%ai)
67
73
local committer=$( git log $filter --format=format:%cn)
68
74
local committer_date=$( git log $filter --format=format:%ci)
69
- local message=$( git log $filter --format=format:%B | sed ' s/\"/\\"/g ' )
75
+ local message=$( git log $filter --format=format:%B)
70
76
71
77
local metadata=" "
72
78
metadata+=" {name: \" ($1 ) commit\" , value: \" ${commit} \" },"
0 commit comments