Documentation
¶
Overview ¶
Package review renders the agent's own answer as a second pull request comment, apart from Costroid's report.
The answer is the agent's text, and the agent read the pull request, so the comment treats it as data: it sits in a fenced code block no line of it can close, so no link, mention, image or HTML in it renders. The comment says the words are the agent's.
Index ¶
Constants ¶
const ( // Marker opens the answer's comment, which is how the next run finds it. // It differs from the report's marker, so neither run edits the other's. Marker = "<!-- costroid:review -->" // MaxAnswerBytes is the most of the answer the comment shows. A fence is // at most half the answer's length plus one, so the body stays under the // 65535 characters GitHub stores in a comment. MaxAnswerBytes = 30000 // MaxFileBytes is the most of the answer the agent's job keeps and the // report's job reads. MaxFileBytes = 1 << 20 )
Variables ¶
This section is empty.
Functions ¶
func Clean ¶
Clean makes the answer safe to fence: valid UTF-8 with line feeds for line ends, with every control character but tab and line feed, and every direction override, shown as U+FFFD, and no blank lines around it. It cuts the result to MaxAnswerBytes at a character boundary and says whether it cut.