File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -263,15 +263,17 @@ jobs:
263
263
| jq -r --arg commentMarker "$COMMENT_MARKER" 'first(.[] | select(.body | contains($commentMarker)) | .id)'
264
264
)
265
265
if [ -z "$existingCommentId" ]; then
266
- gh pr comment "$prNumber" --body "$(cat pr-comment.md) <!-- $COMMENT_MARKER -->"
266
+ ( cat pr-comment.md && echo "<!-- $COMMENT_MARKER -->" ; ) >gh-pr-comment-data.md
267
+ gh pr comment "$prNumber" --body-file gh-pr-comment-data.md
267
268
else
269
+ jq --null-input --rawfile body pr-comment.md --arg marker "<!-- $COMMENT_MARKER -->" '{body: ($body + $marker)}' >curl-patch-data.json
268
270
curl --fail-with-body -sSL \
269
271
-X PATCH \
270
272
-H "Authorization: Bearer $GH_TOKEN" \
271
273
-H "Accept: application/vnd.github+json" \
272
274
-H "X-GitHub-Api-Version: 2022-11-28" \
273
275
"https://api.github.com/repos/${GITHUB_REPOSITORY}/issues/comments/${existingCommentId}" \
274
- -d "$(jq --null-input --arg body "$(cat pr-comment.md) <!-- $COMMENT_MARKER -->" '{body: $body}')"
276
+ -d @curl-patch-data.json
275
277
fi
276
278
277
279
You can’t perform that action at this time.
0 commit comments