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

Function prAssigneeList

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

Source from the content-addressed store, hash-verified

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