MCPcopy Create free account
hub / github.com/cli/cli / prAssigneeList

Function prAssigneeList

pkg/cmd/pr/view/view.go:428–443  ·  view source on GitHub ↗
(pr api.PullRequest)

Source from the content-addressed store, hash-verified

426}
427
428func prAssigneeList(pr api.PullRequest) string {
429 if len(pr.Assignees.Nodes) == 0 {
430 return ""
431 }
432
433 AssigneeNames := make([]string, 0, len(pr.Assignees.Nodes))
434 for _, assignee := range pr.Assignees.Nodes {
435 AssigneeNames = append(AssigneeNames, assignee.DisplayName())
436 }
437
438 list := strings.Join(AssigneeNames, ", ")
439 if pr.Assignees.TotalCount > len(pr.Assignees.Nodes) {
440 list += ", …"
441 }
442 return list
443}
444
445func prLabelList(pr api.PullRequest, cs *iostreams.ColorScheme) string {
446 if len(pr.Labels.Nodes) == 0 {

Callers 2

printRawPrPreviewFunction · 0.85
printHumanPrPreviewFunction · 0.85

Calls 2

JoinMethod · 0.80
DisplayNameMethod · 0.65

Tested by

no test coverage detected