Show friendly display names in gh issue view
Apply DisplayName() to author and assignee display in issue view, consistent with the pr view changes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
7198d270b4
commit
3651c289ed
1 changed files with 3 additions and 3 deletions
|
|
@ -197,7 +197,7 @@ func printRawIssuePreview(out io.Writer, issue *api.Issue) error {
|
|||
// processing many issues with head and grep.
|
||||
fmt.Fprintf(out, "title:\t%s\n", issue.Title)
|
||||
fmt.Fprintf(out, "state:\t%s\n", issue.State)
|
||||
fmt.Fprintf(out, "author:\t%s\n", issue.Author.Login)
|
||||
fmt.Fprintf(out, "author:\t%s\n", issue.Author.DisplayName())
|
||||
fmt.Fprintf(out, "labels:\t%s\n", labels)
|
||||
fmt.Fprintf(out, "comments:\t%d\n", issue.Comments.TotalCount)
|
||||
fmt.Fprintf(out, "assignees:\t%s\n", assignees)
|
||||
|
|
@ -222,7 +222,7 @@ func printHumanIssuePreview(opts *ViewOptions, baseRepo ghrepo.Interface, issue
|
|||
fmt.Fprintf(out,
|
||||
"%s • %s opened %s • %s\n",
|
||||
issueStateTitleWithColor(cs, issue),
|
||||
issue.Author.Login,
|
||||
issue.Author.DisplayName(),
|
||||
text.FuzzyAgo(opts.Now(), issue.CreatedAt),
|
||||
text.Pluralize(issue.Comments.TotalCount, "comment"),
|
||||
)
|
||||
|
|
@ -298,7 +298,7 @@ func issueAssigneeList(issue api.Issue) string {
|
|||
|
||||
AssigneeNames := make([]string, 0, len(issue.Assignees.Nodes))
|
||||
for _, assignee := range issue.Assignees.Nodes {
|
||||
AssigneeNames = append(AssigneeNames, assignee.Login)
|
||||
AssigneeNames = append(AssigneeNames, assignee.DisplayName())
|
||||
}
|
||||
|
||||
list := strings.Join(AssigneeNames, ", ")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue