MCPcopy Index your code
hub / github.com/github/gh-aw / renderSingleAuditDiffMarkdown

Function renderSingleAuditDiffMarkdown

pkg/cli/audit_diff_render.go:60–72  ·  view source on GitHub ↗

renderSingleAuditDiffMarkdown outputs a single audit diff as markdown to stdout

(diff *AuditDiff)

Source from the content-addressed store, hash-verified

58
59// renderSingleAuditDiffMarkdown outputs a single audit diff as markdown to stdout
60func renderSingleAuditDiffMarkdown(diff *AuditDiff) {
61 auditDiffRenderLog.Printf("Rendering audit diff as markdown: run1=%d, run2=%d", diff.Run1ID, diff.Run2ID)
62 fmt.Fprintf(os.Stdout, "### Audit Diff: Run #%d → Run #%d\n\n", diff.Run1ID, diff.Run2ID)
63
64 if isEmptyAuditDiff(diff) {
65 fmt.Fprintln(os.Stdout, "No behavioral changes detected between the two runs.")
66 return
67 }
68
69 renderFirewallDiffMarkdownSection(diff.FirewallDiff)
70 renderMCPToolsDiffMarkdownSection(diff.MCPToolsDiff)
71 renderRunMetricsDiffMarkdownSection(diff.Run1ID, diff.Run2ID, diff.RunMetricsDiff)
72}
73
74// renderSingleAuditDiffPretty outputs a single audit diff as formatted console output to stderr
75func renderSingleAuditDiffPretty(diff *AuditDiff) {

Callers 1

renderAuditDiffMarkdownFunction · 0.85

Calls 5

isEmptyAuditDiffFunction · 0.85
PrintfMethod · 0.45

Tested by

no test coverage detected