Skip to content

Commit

Permalink
fix: Comment author name is not always displayed (#618)
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitpokhrel authored May 8, 2023
1 parent d5f7181 commit eaf2d06
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion internal/view/issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,9 +400,15 @@ func (i Issue) comments() []issueComment {
body = c.Body.(string)
body = md.FromJiraMD(body)
}
authorName := func() string {
if c.Author.DisplayName != "" {
return c.Author.DisplayName
}
return c.Author.Name
}
meta := fmt.Sprintf(
"\n %s • %s",
coloredOut(c.Author.Name, color.FgWhite, color.Bold),
coloredOut(authorName(), color.FgWhite, color.Bold),
coloredOut(cmdutil.FormatDateTimeHuman(c.Created, jira.RFC3339), color.FgWhite, color.Bold),
)
if idx == total-1 {
Expand Down

0 comments on commit eaf2d06

Please sign in to comment.