Skip to content

Commit

Permalink
fix: fix broken formatting of first comment in case of command output…
Browse files Browse the repository at this point in the history
… truncation (#4980)

Co-authored-by: PePe Amengual <[email protected]>
  • Loading branch information
benoittoulme and jamengual authored Oct 24, 2024
1 parent 546b931 commit 7f4a420
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/events/vcs/github_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,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<details><summary>Show Output</summary>\n\n" +
"```diff\n"

comments := common.SplitComment(comment, maxCommentLength, sepEnd, sepStart, g.maxCommentsPerCommand, truncationHeader)
for i := range comments {
Expand Down

0 comments on commit 7f4a420

Please sign in to comment.