diff --git a/.github/workflows/std.yml b/.github/workflows/std.yml index 336dfaa0862..99ae85e04bb 100644 --- a/.github/workflows/std.yml +++ b/.github/workflows/std.yml @@ -263,15 +263,17 @@ jobs: | jq -r --arg commentMarker "$COMMENT_MARKER" 'first(.[] | select(.body | contains($commentMarker)) | .id)' ) if [ -z "$existingCommentId" ]; then - gh pr comment "$prNumber" --body "$(cat pr-comment.md) " + ( cat pr-comment.md && echo "" ; ) >gh-pr-comment-data.md + gh pr comment "$prNumber" --body-file gh-pr-comment-data.md else + jq --null-input --rawfile body pr-comment.md --arg marker "" '{body: ($body + $marker)}' >curl-patch-data.json curl --fail-with-body -sSL \ -X PATCH \ -H "Authorization: Bearer $GH_TOKEN" \ -H "Accept: application/vnd.github+json" \ -H "X-GitHub-Api-Version: 2022-11-28" \ "https://api.github.com/repos/${GITHUB_REPOSITORY}/issues/comments/${existingCommentId}" \ - -d "$(jq --null-input --arg body "$(cat pr-comment.md) " '{body: $body}')" + -d @curl-patch-data.json fi