From 2c8faa5e9fa0af7d4ba37ccd3edbdf5158bc05d7 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Mon, 18 May 2026 20:28:53 +0100 Subject: [PATCH] Pass comment body file directly --- .github/workflows/pr-checks.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml index f2f781e43..6dee8fc30 100644 --- a/.github/workflows/pr-checks.yml +++ b/.github/workflows/pr-checks.yml @@ -209,7 +209,6 @@ jobs: PR_NUMBER: ${{ github.event.pull_request.number }} run: | significant=$(jq -r '.significant' repo-size-comment/metadata.json) - body=$(cat repo-size-comment/body.md) comment_id=$( gh api "repos/$GITHUB_REPOSITORY/issues/$PR_NUMBER/comments" \ --paginate \ @@ -219,10 +218,10 @@ jobs: if [[ -n "$comment_id" ]]; then echo "Updating existing comment $comment_id." - gh api --method PATCH "repos/$GITHUB_REPOSITORY/issues/comments/$comment_id" --field body="$body" + gh api --method PATCH "repos/$GITHUB_REPOSITORY/issues/comments/$comment_id" --field body=@repo-size-comment/body.md elif [[ "$significant" == "true" ]]; then echo "Creating new repo size comment." - gh api --method POST "repos/$GITHUB_REPOSITORY/issues/$PR_NUMBER/comments" --field body="$body" + gh api --method POST "repos/$GITHUB_REPOSITORY/issues/$PR_NUMBER/comments" --field body=@repo-size-comment/body.md else echo "Skipping repo size comment because the delta is below the threshold and no sticky comment exists." fi