From bc1f2718d56c3bf8e0ecaf66d2e09e8d19ecb982 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Fri, 21 Aug 2026 17:01:39 +0200 Subject: [PATCH] tools: fix max body length handler in `create-release-proposal.sh` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Antoine du Hamel PR-URL: https://github.com/nodejs/node/pull/65455 Reviewed-By: Juan José Arboleda Reviewed-By: Richard Lau --- tools/actions/create-release-proposal.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/actions/create-release-proposal.sh b/tools/actions/create-release-proposal.sh index f4878f1cc94..9240fa2ad7f 100755 --- a/tools/actions/create-release-proposal.sh +++ b/tools/actions/create-release-proposal.sh @@ -35,9 +35,14 @@ HEAD_SHA="$(git rev-parse HEAD^)" TITLE="$(git log -1 --format=%s)" -TEMP_BODY="$(awk -v MAX_BODY_LENGTH="65536" \ - "/^## ${RELEASE_DATE}/,/^ MAX_BODY_LENGTH) {exit 1;} print }" \ - "doc/changelogs/CHANGELOG_V${RELEASE_LINE}.md" || echo "…")" +# GH rest API has an undocumented limit of 65536 char for the body, setting it +# to 65534 to account for the ellipsis and the final EOL. +TEMP_BODY="$(awk -v MAX_BODY_LENGTH="65534" \ + "/^## ${RELEASE_DATE}/,/^ MAX_BODY_LENGTH) {exit 1;} + print + }" "doc/changelogs/CHANGELOG_V${RELEASE_LINE}.md" || echo "…")" # Create the proposal branch gh api \