fix: body is too long when create github release (#3249)

Co-authored-by: tadelesh <tadelesh.shi@live.cn>
This commit is contained in:
Azure SDK Bot 2022-01-18 08:54:00 -08:00 committed by GitHub
parent 15b4e2b4d6
commit 34e5d9277b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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