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

Function prAssigneeList

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

Source from the content-addressed store, hash-verified

405}
406
407func prAssigneeList(pr api.PullRequest) string {
408 if len(pr.Assignees.Nodes) == 0 {
409 return ""
410 }
411
412 AssigneeNames := make([]string, 0, len(pr.Assignees.Nodes))
413 for _, assignee := range pr.Assignees.Nodes {
414 AssigneeNames = append(AssigneeNames, assignee.DisplayName())
415 }
416
417 list := strings.Join(AssigneeNames, ", ")
418 if pr.Assignees.TotalCount > len(pr.Assignees.Nodes) {
419 list += ", …"
420 }
421 return list
422}
423
424func prLabelList(pr api.PullRequest, cs *iostreams.ColorScheme) string {
425 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