MCPcopy
hub / github.com/cli/cli / ScopeLabels

Function ScopeLabels

internal/skills/registry/registry.go:429–438  ·  view source on GitHub ↗

ScopeLabels returns the display labels for the scope selection prompt. If repoName is non-empty, it is included in the project-scope label for additional context.

(repoName string)

Source from the content-addressed store, hash-verified

427// If repoName is non-empty, it is included in the project-scope label
428// for additional context.
429func ScopeLabels(repoName string) []string {
430 projectLabel := "Project: install in current repository (recommended)"
431 if repoName != "" {
432 projectLabel = fmt.Sprintf("Project: %s (recommended)", repoName)
433 }
434 return []string{
435 projectLabel,
436 "Global: install in home directory (available everywhere)",
437 }
438}
439
440// RepoNameFromRemote extracts "owner/repo" from a git remote URL.
441func RepoNameFromRemote(remote string) string {

Callers 3

promptInstallFunction · 0.92
resolveScopeFunction · 0.92
TestScopeLabelsFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestScopeLabelsFunction · 0.68