diff --git a/command/issue.go b/command/issue.go index c6fba0452..38f3c1a8b 100644 --- a/command/issue.go +++ b/command/issue.go @@ -254,26 +254,17 @@ func IssueStateTitleWithColor(state string) string { } func printIssuePreview(out io.Writer, issue *api.Issue) error { - coloredLabels := labelList(*issue) - if coloredLabels != "" { - coloredLabels = fmt.Sprintf("%s", coloredLabels) - } - now := time.Now() ago := now.Sub(issue.CreatedAt) fmt.Fprintln(out, utils.Bold(issue.Title)) fmt.Fprintf(out, "%s", IssueStateTitleWithColor(issue.State)) - fmt.Fprint(out, utils.Gray(fmt.Sprintf( + fmt.Fprintln(out, utils.Gray(fmt.Sprintf( " • %s opened %s • %s", issue.Author.Login, utils.FuzzyAgo(ago), utils.Pluralize(issue.Comments.TotalCount, "comment"), ))) - if coloredLabels != "" { - fmt.Fprintf(out, utils.Gray(fmt.Sprintf(" • %s", coloredLabels))) - } - fmt.Fprintf(out, "\n") if issue.Body != "" { fmt.Fprintln(out) diff --git a/command/issue_test.go b/command/issue_test.go index 4730ef811..7552b1e17 100644 --- a/command/issue_test.go +++ b/command/issue_test.go @@ -297,7 +297,7 @@ func TestIssueView_preview(t *testing.T) { expectedLines := []*regexp.Regexp{ regexp.MustCompile(`ix of coins`), - regexp.MustCompile(`Open • marseilles opened about 292 years ago • 9 comments • tarot`), + regexp.MustCompile(`Open • marseilles opened about 292 years ago • 9 comments`), regexp.MustCompile(`bold story`), regexp.MustCompile(`View this issue on GitHub: https://github.com/OWNER/REPO/issues/123`), } @@ -357,7 +357,7 @@ func TestIssueView_previewClosedState(t *testing.T) { expectedLines := []*regexp.Regexp{ regexp.MustCompile(`ix of coins`), - regexp.MustCompile(`Closed • marseilles opened about 292 years ago • 9 comments • tarot`), + regexp.MustCompile(`Closed • marseilles opened about 292 years ago • 9 comments`), regexp.MustCompile(`bold story`), regexp.MustCompile(`View this issue on GitHub: https://github.com/OWNER/REPO/issues/123`), } @@ -387,7 +387,7 @@ func TestIssueView_previewWithEmptyBody(t *testing.T) { expectedLines := []*regexp.Regexp{ regexp.MustCompile(`ix of coins`), - regexp.MustCompile(`Open • marseilles opened about 292 years ago • 9 comments • tarot`), + regexp.MustCompile(`Open • marseilles opened about 292 years ago • 9 comments`), regexp.MustCompile(`View this issue on GitHub: https://github.com/OWNER/REPO/issues/123`), } for _, r := range expectedLines {