MCPcopy Index your code
hub / github.com/promptfoo/promptfoo / buildCommentBody

Function buildCommentBody

code-scan-action/src/main.ts:373–385  ·  view source on GitHub ↗
(comment: Comment)

Source from the content-addressed store, hash-verified

371}
372
373function buildCommentBody(comment: Comment): string {
374 let body = formatSeverity(comment.severity) + comment.finding;
375
376 if (comment.fix) {
377 body += `\n\n<details>\n<summary>💡 Suggested Fix</summary>\n\n${comment.fix}\n</details>`;
378 }
379
380 if (comment.aiAgentPrompt) {
381 body += `\n\n<details>\n<summary>🤖 AI Agent Prompt</summary>\n\n${comment.aiAgentPrompt}\n</details>`;
382 }
383
384 return body;
385}
386
387function buildGeneralCommentBody(comment: Comment): string {
388 const body = buildCommentBody(comment);

Callers 2

buildGeneralCommentBodyFunction · 0.85
toReviewCommentFunction · 0.85

Calls 1

formatSeverityFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…