MCPcopy Index your code
hub / github.com/cli/cli / prAssigneeList

Function prAssigneeList

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

Source from the content-addressed store, hash-verified

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