Skip to content

Commit 2c8faa5

Browse files
committed
Pass comment body file directly
1 parent 15a712b commit 2c8faa5

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

.github/workflows/pr-checks.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ jobs:
209209
PR_NUMBER: ${{ github.event.pull_request.number }}
210210
run: |
211211
significant=$(jq -r '.significant' repo-size-comment/metadata.json)
212-
body=$(cat repo-size-comment/body.md)
213212
comment_id=$(
214213
gh api "repos/$GITHUB_REPOSITORY/issues/$PR_NUMBER/comments" \
215214
--paginate \
@@ -219,10 +218,10 @@ jobs:
219218
220219
if [[ -n "$comment_id" ]]; then
221220
echo "Updating existing comment $comment_id."
222-
gh api --method PATCH "repos/$GITHUB_REPOSITORY/issues/comments/$comment_id" --field body="$body"
221+
gh api --method PATCH "repos/$GITHUB_REPOSITORY/issues/comments/$comment_id" --field body=@repo-size-comment/body.md
223222
elif [[ "$significant" == "true" ]]; then
224223
echo "Creating new repo size comment."
225-
gh api --method POST "repos/$GITHUB_REPOSITORY/issues/$PR_NUMBER/comments" --field body="$body"
224+
gh api --method POST "repos/$GITHUB_REPOSITORY/issues/$PR_NUMBER/comments" --field body=@repo-size-comment/body.md
226225
else
227226
echo "Skipping repo size comment because the delta is below the threshold and no sticky comment exists."
228227
fi

0 commit comments

Comments
 (0)