MCPcopy Create free account
hub / github.com/alibaba/open-code-review / formatComment

Function formatComment

scripts/github-actions/post-review-comments.js:1017–1025  ·  view source on GitHub ↗
(comment, id)

Source from the content-addressed store, hash-verified

1015// rendered) so getPostedCommentIds can match it back on retry for the
1016// idempotency check. The code suggestion block is then appended if present.
1017function formatComment(comment, id) {
1018 let body = id ? `<!-- ${id} -->\n` : "";
1019 body += comment.content || "";
1020 if (comment.suggestion_code && comment.existing_code) {
1021 body += "\n\n**Suggestion:**\n";
1022 body += fencedBlock(comment.suggestion_code, "suggestion");
1023 }
1024 return body;
1025}
1026
1027function formatCommentMarkdown(comment, error) {
1028 let md = `### 📄 \`${comment.path}\``;

Callers 1

runPostReviewCommentsFunction · 0.85

Calls 1

fencedBlockFunction · 0.85

Tested by

no test coverage detected