Skip to content

Commit 84568dc

Browse files
elvessilvavieiraaduh95
authored andcommitted
tools: edit create-release-proposal workflow to handle pr body length
PR-URL: #57841 Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
1 parent 764e874 commit 84568dc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/actions/create-release-proposal.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ HEAD_SHA="$(git rev-parse HEAD^)"
3131

3232
TITLE="$(git log -1 --format=%s)"
3333

34-
# Use a temporary file for the PR body
35-
TEMP_BODY="$(awk "/## ${RELEASE_DATE}/,/^<a id=/{ if (!/^<a id=/) print }" "doc/changelogs/CHANGELOG_V${RELEASE_LINE}.md")"
34+
TEMP_BODY="$(awk -v MAX_BODY_LENGTH="65536" \
35+
"/^## ${RELEASE_DATE}/,/^<a id=/{ if (/^<a id=/) {exit;} if ((output_length += length(\$0)) > MAX_BODY_LENGTH) {exit 1;} print }" \
36+
"doc/changelogs/CHANGELOG_V${RELEASE_LINE}.md" || echo "")"
3637

3738
# Create the proposal branch
3839
gh api \

0 commit comments

Comments
 (0)