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:
parent
eb447168df
commit
414013dcfb
@ -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 \
|
||||
|
Loading…
x
Reference in New Issue
Block a user