tools: edit create-release-proposal workflow to handle pr body length

PR-URL: https://github.com/nodejs/node/pull/57841
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
Elves Vieira 2025-04-14 11:54:17 -01:00 committed by Marco Ippolito
parent eb447168df
commit 414013dcfb
No known key found for this signature in database
GPG Key ID: 27F5E38D5B0A215F

View File

@ -31,8 +31,9 @@ HEAD_SHA="$(git rev-parse HEAD^)"
TITLE="$(git log -1 --format=%s)"
# Use a temporary file for the PR body
TEMP_BODY="$(awk "/## ${RELEASE_DATE}/,/^<a id=/{ if (!/^<a id=/) print }" "doc/changelogs/CHANGELOG_V${RELEASE_LINE}.md")"
TEMP_BODY="$(awk -v MAX_BODY_LENGTH="65536" \
"/^## ${RELEASE_DATE}/,/^<a id=/{ if (/^<a id=/) {exit;} if ((output_length += length(\$0)) > MAX_BODY_LENGTH) {exit 1;} print }" \
"doc/changelogs/CHANGELOG_V${RELEASE_LINE}.md" || echo "…")"
# Create the proposal branch
gh api \