Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatJSON ¶
func FormatJSON(w io.Writer, output ReviewOutput) error
FormatJSON serializes ReviewOutput as JSON and writes to w.
func FormatPatch ¶
FormatPatch writes the raw unified diff to w.
func FormatSummary ¶
func FormatSummary(w io.Writer, output ReviewOutput) error
FormatSummary writes a human-readable summary to w.
func ShortAuthor ¶ added in v0.3.0
ShortAuthor extracts the username from an ARN (last segment after /).
Types ¶
type Comment ¶
type Comment struct {
CommentId string `json:"commentId"`
InReplyTo string `json:"inReplyTo,omitempty"`
Author string `json:"author"`
AuthorARN string `json:"authorArn"`
Content string `json:"content"`
Timestamp time.Time `json:"timestamp"`
FilePath string `json:"filePath,omitempty"`
}
Comment is the JSON-serializable representation of a PR comment.
type PRMetadata ¶
type PRMetadata struct {
PRId string `json:"prId"`
Title string `json:"title"`
Description string `json:"description"`
Author string `json:"author"`
AuthorARN string `json:"authorArn"`
SourceBranch string `json:"sourceBranch"`
DestinationBranch string `json:"destinationBranch"`
Status string `json:"status"`
CreationDate string `json:"creationDate"`
}
PRMetadata is the JSON-serializable representation of PR metadata.
type ReviewOutput ¶
type ReviewOutput struct {
Metadata PRMetadata `json:"metadata"`
Comments []Comment `json:"comments"`
Diff string `json:"diff"`
}
ReviewOutput is the top-level structure for JSON output combining PR metadata, comments, and diff.
Click to show internal directories.
Click to hide internal directories.