Documentation
¶
Index ¶
- Variables
- func CompletionFunc() cobra.CompletionFunc
- func GetProjectForRepo(ctx context.Context, repoName string) string
- func GetRepository(ctx context.Context, repoName string) (*scm.Repository, bool)
- func Init(ctx context.Context, flush bool)
- func NoCompletion() cobra.CompletionFunc
- func RepositoryList(ctx context.Context, filters ...string) mapset.Set[string]
- type Label
- type LabelGroup
Constants ¶
This section is empty.
Variables ¶
var Catalog = make(map[string]scm.Repository)
Catalog contains a cached set of repositories and their metadata from Bitbucket
Labels contains a mapping of label names with the set of repositories matching each label
Functions ¶
func CompletionFunc ¶ added in v0.9.6
func CompletionFunc() cobra.CompletionFunc
CompletionFunc provides shell completion suggestions based on the currently-known repositories and labels.
func GetProjectForRepo ¶ added in v0.9.6
GetProjectForRepo returns the project for a given repository name. It checks the catalog first, then falls back to the default project.
func GetRepository ¶ added in v0.9.6
GetRepository retrieves a repository from the catalog by name. It attempts to find the repository using different lookup strategies: 1. Direct lookup (if repo contains project/name) 2. Lookup with default project prefix 3. Search through all catalog entries for matching name
func Init ¶
Init initializes the repository catalog and label mappings, updating the cache if necessary (based on configured TTL).
func NoCompletion ¶ added in v0.9.6
func NoCompletion() cobra.CompletionFunc
NoCompletion provides a no-op completion function to disable file completions for interstitial commands.
Types ¶
type LabelGroup ¶ added in v0.9.6
LabelGroup holds categorized label names extracted from a list of filter arguments.
func ParseLabels ¶ added in v0.9.6
func ParseLabels(ctx context.Context, filters ...string) (LabelGroup, []string)
ParseLabels constructs a parsed group of labels based on the provided filters, along with the list of matching repositories from the local cache.
func (LabelGroup) String ¶ added in v0.9.6
func (lg LabelGroup) String() string
String provides a set-theory representation of the LabelGroup.
(forced ∪ (included ∖ excluded))
func (LabelGroup) ToSlices ¶ added in v0.9.6
func (lg LabelGroup) ToSlices() (forced, included, excluded []string)
ToSlices converts the LabelGroup sets to sorted slices.