MCPcopy
hub / github.com/cli/cli / ListHeader

Function ListHeader

pkg/cmd/pr/shared/display.go:73–83  ·  view source on GitHub ↗
(repoName string, itemName string, matchCount int, totalMatchCount int, hasFilters bool)

Source from the content-addressed store, hash-verified

71}
72
73func ListHeader(repoName string, itemName string, matchCount int, totalMatchCount int, hasFilters bool) string {
74 if hasFilters {
75 matchVerb := "match"
76 if totalMatchCount == 1 {
77 matchVerb = "matches"
78 }
79 return fmt.Sprintf("Showing %d of %s in %s that %s your search", matchCount, text.Pluralize(totalMatchCount, itemName), repoName, matchVerb)
80 }
81
82 return fmt.Sprintf("Showing %d of %s in %s", matchCount, text.Pluralize(totalMatchCount, fmt.Sprintf("open %s", itemName)), repoName)
83}
84
85func PrCheckStatusSummaryWithColor(cs *iostreams.ColorScheme, checks api.PullRequestChecksStatus) string {
86 var summary = cs.Muted("No checks")

Callers 2

listRunFunction · 0.92
Test_listHeaderFunction · 0.85

Calls 1

PluralizeFunction · 0.92

Tested by 1

Test_listHeaderFunction · 0.68