Documentation
¶
Overview ¶
Package templates renders every piece of markdown patchy writes — issue bodies, comments, pull-request bodies, and the agent-facing handoff files — from embedded text/templates, so the artifacts stay consistent across the estate.
The issue body carries a machine-readable manifest block (an HTML comment holding JSON) that is the authoritative record of the alerts accumulated into the issue; the human-readable body is re-rendered from the manifest on every accumulation, never string-edited. The accumulator (source-controller) owns the body; everyone else appends comments.
Index ¶
- func EnrichmentMarker(enhancer string) string
- func FindingIssueTitle(f *v1alpha1.Finding) string
- func PRBody(issue int, report string) (string, error)
- func RenderEnrichmentProjection(e v1alpha1.Enrichment) string
- func RenderFindingIssue(f *v1alpha1.Finding) (string, error)
- func RenderInvestigatePrompt(p InvestigatePrompt) (string, error)
- func RenderRemediatePrompt(p RemediatePrompt) (string, error)
- func RenderStageReportComment(stage string, attempt int32, report string) string
- type InvestigatePrompt
- type RemediatePrompt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnrichmentMarker ¶ added in v0.5.3
EnrichmentMarker heads one enhancer's sticky tracking comment; the projection finds the comment to update in place by this prefix.
func FindingIssueTitle ¶ added in v0.4.0
FindingIssueTitle is the tracking-issue title projected from a Finding.
func PRBody ¶
PRBody renders the pull-request body for a remediation branch; issue is the tracking issue number ("Fixes #issue" auto-links and auto-closes).
func RenderEnrichmentProjection ¶ added in v0.4.0
func RenderEnrichmentProjection(e v1alpha1.Enrichment) string
RenderEnrichmentProjection renders one enhancer enrichment as its sticky tracking-issue comment.
func RenderFindingIssue ¶ added in v0.4.0
RenderFindingIssue renders the tracking-issue body from the Finding — a pure human-facing projection (the CR is the state; the body carries only a finding-name marker comment for debugging).
func RenderInvestigatePrompt ¶ added in v0.4.0
func RenderInvestigatePrompt(p InvestigatePrompt) (string, error)
RenderInvestigatePrompt renders the investigation prompt.
func RenderRemediatePrompt ¶
func RenderRemediatePrompt(p RemediatePrompt) (string, error)
RenderRemediatePrompt renders the remediation prompt.