Skip to content

Commit

Permalink
Add missing markdown header, improve readability
Browse files Browse the repository at this point in the history
  • Loading branch information
vovinacci committed Feb 4, 2025
1 parent f5bd521 commit 042f102
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions pkg/vcs/github_client/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,20 @@ import (
"github.com/zapier/kubechecks/telemetry"
)

const MaxCommentLength = 64 * 1024

const sepEnd = "\n```\n</details>" +
"\n<br>\n\n**Warning**: Output length greater than maximum allowed comment size. Continued in next comment."

const sepStart = "Continued from previous comment.\n<details><summary>Show Output</summary>\n\n"
const (
MaxCommentLength = 64 * 1024

// Using string concatenation for better code readability.
// Cannot use raw string literal (backticks) here as the separators themselves contain backticks.
sepStart = "Continued from previous comment.\n" +
"<details><summary>Show Output</summary>\n\n" +
"```diff\n"

sepEnd = "\n```\n" +
"</details>\n" +
"<br>\n\n" +
"**Warning**: Output length greater than maximum allowed comment size. Continued in next comment."
)

// splitComment splits the given comment into chunks from the beginning,
// ensuring that each decorated chunk does not exceed maxSize.
Expand Down

0 comments on commit 042f102

Please sign in to comment.