MCPcopy Create free account
hub / github.com/cli/cli / resolveVersion

Function resolveVersion

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

Source from the content-addressed store, hash-verified

621}
622
623func resolveVersion(opts *InstallOptions, client *api.Client, hostname string) (*discovery.ResolvedRef, error) {
624 opts.IO.StartProgressIndicatorWithLabel("Resolving version")
625 resolved, err := discovery.ResolveRef(client, hostname, opts.repo.RepoOwner(), opts.repo.RepoName(), opts.version)
626 opts.IO.StopProgressIndicator()
627 if err != nil {
628 return nil, fmt.Errorf("could not resolve version: %w", err)
629 }
630 fmt.Fprintf(opts.IO.ErrOut, "Using ref %s (%s)\n", discovery.ShortRef(resolved.Ref), git.ShortSHA(resolved.SHA))
631 return resolved, nil
632}
633
634func discoverSkills(opts *InstallOptions, client *api.Client, hostname string, resolved *discovery.ResolvedRef) ([]discovery.Skill, error) {
635 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