Skip to content

Commit 08cbea6

Browse files
authored
ci: minor refactor
1 parent e67d908 commit 08cbea6

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

.github/actions/update-vscode-extensions/update-vscode-extensions.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,13 @@ get_github_releasenotes() {
3434

3535
RELEASE_BODY=$(gh release view --json body --jq '.body' -R $GITHUB_URL $TAG)
3636
MAX_RELEASE_BODY_SIZE=32768
37-
TRUNCATED=""
3837

3938
if [[ ${#RELEASE_BODY} -gt $MAX_RELEASE_BODY_SIZE ]]
4039
then
41-
TRUNCATED="\n\n... [truncated]"
40+
printf "%.*s\n\n... [truncated]\n\n" "$MAX_RELEASE_BODY_SIZE" "$RELEASE_BODY" "$TRUNCATED"
41+
else
42+
printf "%s\n\n" "$RELEASE_BODY"
4243
fi
43-
44-
printf "%.*s%s\n\n" "$MAX_RELEASE_BODY_SIZE" "$RELEASE_BODY" "$TRUNCATED"
4544
done
4645
}
4746

0 commit comments

Comments
 (0)