MCPcopy
hub / github.com/cli/cli / NoRulesetsFoundError

Function NoRulesetsFoundError

pkg/cmd/ruleset/shared/shared.go:114–121  ·  view source on GitHub ↗
(orgOption string, repoI ghrepo.Interface, includeParents bool)

Source from the content-addressed store, hash-verified

112}
113
114func NoRulesetsFoundError(orgOption string, repoI ghrepo.Interface, includeParents bool) error {
115 entityName := EntityName(orgOption, repoI)
116 parentsMsg := ""
117 if includeParents {
118 parentsMsg = " or its parents"
119 }
120 return cmdutil.NewNoResultsError(fmt.Sprintf("no rulesets found in %s%s", entityName, parentsMsg))
121}
122
123func EntityName(orgOption string, repoI ghrepo.Interface) string {
124 if orgOption != "" {

Callers 2

viewRunFunction · 0.92
listRunFunction · 0.92

Calls 2

NewNoResultsErrorFunction · 0.92
EntityNameFunction · 0.85

Tested by

no test coverage detected