AffectedReportGenerator

Renders an AffectedModules result as the two local artefacts aalekhAffected writes: a PR-ready Markdown comment and a machine-readable JSON envelope. A consumer's own CI posts the Markdown as a pull-request comment - Aalekh never posts anything itself.

Pure string transforms - no Gradle, no I/O.

Functions

Link copied to clipboard
fun json(affected: AffectedModules, baseRef: String, headRef: String): String

Serialises the affected graph, tagged with the diff range, to pretty-printed JSON.

Link copied to clipboard
fun markdown(affected: AffectedModules, baseRef: String, headRef: String, projectName: String): String

Renders the affected graph as a Markdown pull-request comment.