diff --git a/ci-scripts/report-size.sh b/ci-scripts/report-size.sh index 0c117f8..64874f6 100755 --- a/ci-scripts/report-size.sh +++ b/ci-scripts/report-size.sh @@ -24,7 +24,7 @@ if [ "$CI" = "true" ]; then jq --arg head_ref "$GITHUB_HEAD_REF" '.[] | select(.head.ref == $head_ref) | .number') echo "Retrieved index: $pr_number" echo "Expected PR URL: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/pulls/$pr_number" - echo 'Generating comment body' + comment=$( cat <<-EOF ### NixOS Configurations sizes @@ -36,9 +36,8 @@ if [ "$CI" = "true" ]; then $(package_size_table) EOF ) - echo 'Posting comment:' - echo "$comment" - curl -o - -I -X 'POST' \ + echo "Posting comment: $comment" + curl -X 'POST' \ "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/issues/$pr_number/comments?token=$GITHUB_TOKEN" \ -H 'accept: application/json' \ -d "$(echo '{}' | jq --arg comment "$comment" '.body=$comment')"