Skip to content

Commit

Permalink
chore(ci): fix "curl: Argument list too long" (#1338)
Browse files Browse the repository at this point in the history
  • Loading branch information
michalrus authored Jun 19, 2024
1 parent bc7f937 commit dbde8e1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/std.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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) <!-- $COMMENT_MARKER -->"
( cat pr-comment.md && echo "<!-- $COMMENT_MARKER -->" ; ) >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 "<!-- $COMMENT_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) <!-- $COMMENT_MARKER -->" '{body: $body}')"
-d @curl-patch-data.json
fi
Expand Down

0 comments on commit dbde8e1

Please sign in to comment.