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 (runatlantis#4980)

Co-authored-by: PePe Amengual <[email protected]>
Signed-off-by: a1k0u <[email protected]>
  • Loading branch information
2 people authored and a1k0u committed Nov 1, 2024
1 parent 1ec2d06 commit 1f6c4aa
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 @@ -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<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 1f6c4aa

Please sign in to comment.