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

Function resolveVersion

pkg/cmd/skills/install/install.go:618–627  ·  view source on GitHub ↗
(opts *InstallOptions, client *api.Client, hostname string)

Source from the content-addressed store, hash-verified

616}
617
618func resolveVersion(opts *InstallOptions, client *api.Client, hostname string) (*discovery.ResolvedRef, error) {
619 opts.IO.StartProgressIndicatorWithLabel("Resolving version")
620 resolved, err := discovery.ResolveRef(client, hostname, opts.repo.RepoOwner(), opts.repo.RepoName(), opts.version)
621 opts.IO.StopProgressIndicator()
622 if err != nil {
623 return nil, fmt.Errorf("could not resolve version: %w", err)
624 }
625 fmt.Fprintf(opts.IO.ErrOut, "Using ref %s (%s)\n", discovery.ShortRef(resolved.Ref), git.ShortSHA(resolved.SHA))
626 return resolved, nil
627}
628
629func discoverSkills(opts *InstallOptions, client *api.Client, hostname string, resolved *discovery.ResolvedRef) ([]discovery.Skill, error) {
630 opts.IO.StartProgressIndicatorWithLabel("Discovering skills")

Callers 1

installRunFunction · 0.85

Calls 8

ResolveRefFunction · 0.92
ShortRefFunction · 0.92
ShortSHAFunction · 0.92
RepoOwnerMethod · 0.65
RepoNameMethod · 0.65
StopProgressIndicatorMethod · 0.65
ErrorfMethod · 0.65

Tested by

no test coverage detected