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

Function fetchDescription

internal/skills/discovery/discovery.go:648–661  ·  view source on GitHub ↗

fetchDescription fetches and parses the frontmatter description for a skill.

(client *api.Client, host, owner, repo string, skill *Skill)

Source from the content-addressed store, hash-verified

646
647// fetchDescription fetches and parses the frontmatter description for a skill.
648func fetchDescription(client *api.Client, host, owner, repo string, skill *Skill) string {
649 if skill.BlobSHA == "" {
650 return ""
651 }
652 content, err := FetchBlob(client, host, owner, repo, skill.BlobSHA)
653 if err != nil {
654 return ""
655 }
656 result, err := frontmatter.Parse(content.Raw())
657 if err != nil {
658 return ""
659 }
660 return result.Metadata.Description
661}
662
663// FetchDescriptionsConcurrent fetches descriptions with bounded concurrency.
664func FetchDescriptionsConcurrent(client *api.Client, host, owner, repo string, skills []Skill, onProgress func(done, total int)) {

Callers 2

Calls 3

ParseFunction · 0.92
FetchBlobFunction · 0.85
RawMethod · 0.80

Tested by

no test coverage detected