Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix broken formatting of first comment in case of command output truncation #4980

Merged
merged 8 commits into from
Oct 24, 2024
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