Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Build ¶
func Build(r TriageResult) string
Build constructs the consolidated markdown comment from all phase results. Returns empty string if there is nothing to report.
func DebugInstructions ¶ added in v0.1.1
func DebugInstructions(r TriageResult) string
DebugInstructions returns the collapsible debug log instructions block, or empty string if debug logs are not missing or no debug command is configured.
func Footer ¶ added in v0.1.1
func Footer(r TriageResult) string
Footer returns the bot disclosure footer line based on which phases produced output.
func RewriteBareUpstreamRefs ¶ added in v0.1.1
func RewriteBareUpstreamRefs(text string, upstreamRefs []UpstreamRef, localIssueHints map[int]bool) string
RewriteBareUpstreamRefs rewrites bare `#NNN` references in text to the qualified `OWNER/REPO#NNN` form when the number matches an upstream reference. It does NOT touch numbers inside markdown link text/URLs, already-qualified `owner/repo#NNN` refs, or full URLs. When a number appears in localIssueHints, the rewrite is skipped (local takes precedence over upstream — bare `#NNN` in maintainer prose conventionally means the host repo). The rewrite is idempotent.
func SanitizeLLMOutput ¶ added in v0.1.1
SanitizeLLMOutput strips images, dangerous links, script tags, and HTML from LLM text.
Types ¶
type TriageResult ¶
type TriageResult struct {
IsBug bool
IsEnhancement bool
IsDocBug bool // documentation/meta bug — skip PWA note and debug log prompt
DocsURL string // project documentation site URL (empty = omit doc links)
DebugCommand string // shell command for capturing debug logs (empty = omit debug section)
Phase1 phases.Phase1Result
Phase2 []phases.Suggestion
Phase4a []phases.ContextMatch
}
TriageResult holds all phase outputs for building the consolidated comment. Phase 3 (duplicate detection) and Phase 4b (misclassification) were removed in favour of GitHub native tooling. See docs/plans/2026-03-15-lean-bot-pivot-design.md.
type UpstreamRef ¶ added in v0.1.1
UpstreamRef identifies an upstream GitHub repository issue/PR reference parsed from a doc_url. It is used by rewriteBareUpstreamRefs to qualify bare `#NNN` references in synthesised prose.
func ExtractUpstreamRefs ¶ added in v0.1.1
func ExtractUpstreamRefs(docURLs []string) []UpstreamRef
ExtractUpstreamRefs parses GitHub issue/PR URLs out of the given doc URLs and returns the matching UpstreamRef set. URLs that do not point to a GitHub issue or pull request are skipped.