From 34e5d9277b633d9a97e0729789cfae4e3fec246d Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 18 Jan 2022 08:54:00 -0800 Subject: [PATCH] fix: body is too long when create github release (#3249) Co-authored-by: tadelesh --- eng/common/scripts/artifact-metadata-parsing.ps1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eng/common/scripts/artifact-metadata-parsing.ps1 b/eng/common/scripts/artifact-metadata-parsing.ps1 index dc96ee917..96bf76254 100644 --- a/eng/common/scripts/artifact-metadata-parsing.ps1 +++ b/eng/common/scripts/artifact-metadata-parsing.ps1 @@ -11,6 +11,10 @@ function CreateReleases($pkgList, $releaseApiUrl, $releaseSha) { if ($pkgInfo.ReleaseNotes -ne $null) { $releaseNotes = $pkgInfo.ReleaseNotes } + # As github api limit the body param length with 125000 characters, we have to truncate the release note if needed. + if ($releaseNotes.Length -gt 124996) { + $releaseNotes = $releaseNotes.SubString(0, 124996) + " ..." + } $isPrerelease = $False