(comment Comment)
| 36 | } |
| 37 | |
| 38 | func formatRawComment(comment Comment) string { |
| 39 | if comment.IsHidden() { |
| 40 | return "" |
| 41 | } |
| 42 | var b strings.Builder |
| 43 | fmt.Fprintf(&b, "author:\t%s\n", comment.AuthorLogin()) |
| 44 | fmt.Fprintf(&b, "association:\t%s\n", strings.ToLower(comment.Association())) |
| 45 | fmt.Fprintf(&b, "edited:\t%t\n", comment.IsEdited()) |
| 46 | fmt.Fprintf(&b, "status:\t%s\n", formatRawCommentStatus(comment.Status())) |
| 47 | fmt.Fprintln(&b, "--") |
| 48 | fmt.Fprintln(&b, comment.Content()) |
| 49 | fmt.Fprintln(&b, "--") |
| 50 | return b.String() |
| 51 | } |
| 52 | |
| 53 | func CommentList(io *iostreams.IOStreams, comments api.Comments, reviews api.PullRequestReviews, preview bool) (string, error) { |
| 54 | sortedComments := sortComments(comments, reviews) |
no test coverage detected