From 1f6c4aa13242bad34f3bd9915f7f35d9dc659fef Mon Sep 17 00:00:00 2001 From: Benoit Toulme Date: Thu, 24 Oct 2024 05:03:24 -0700 Subject: [PATCH] fix: fix broken formatting of first comment in case of command output truncation (#4980) Co-authored-by: PePe Amengual <2208324+jamengual@users.noreply.github.com> Signed-off-by: a1k0u --- server/events/vcs/github_client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/events/vcs/github_client.go b/server/events/vcs/github_client.go index 2b5ca4085c..bf32b207a6 100644 --- a/server/events/vcs/github_client.go +++ b/server/events/vcs/github_client.go @@ -235,7 +235,8 @@ func (g *GithubClient) CreateComment(logger logging.SimpleLogging, repo models.R } truncationHeader := "> [!WARNING]\n" + - "> **Warning**: Command output is larger than the maximum number of comments per command. Output truncated.\n" + "> **Warning**: Command output is larger than the maximum number of comments per command. Output truncated.\n
Show Output\n\n" + + "```diff\n" comments := common.SplitComment(comment, maxCommentLength, sepEnd, sepStart, g.maxCommentsPerCommand, truncationHeader) for i := range comments {