Documentation
¶
Overview ¶
Package render handles formatting and output of PR status, issue warnings, and related PR lists in table and JSON formats with optional ANSI colors.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatError ¶
FormatError formats an error message with red color if color is enabled.
Types ¶
type IssueWarning ¶
type IssueWarning struct {
Number int
Title string
// State is "open", "closed", or "draft"
State string
URL string
RelatedPRs []github.RelatedPR
}
IssueWarning contains information for formatting an issue-not-PR warning.
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
Renderer outputs PR status in various formats.
func NewRenderer ¶
NewRenderer creates a new Renderer with the given output settings. Nerd Font icons are enabled by default; set NO_NERD_FONTS=1 to disable.
func (*Renderer) RenderIssueWarning ¶
func (r *Renderer) RenderIssueWarning(info IssueWarning) error
RenderIssueWarning outputs a warning that the input was an issue, not a PR. It renders the issue with appropriate icons/colors and lists related PRs in a table.
func (*Renderer) RenderJSON ¶
RenderJSON outputs the PR status as pretty-printed JSON.