fetchDescription fetches and parses the frontmatter description for a skill.
(client *api.Client, host, owner, repo string, skill *Skill)
| 675 | |
| 676 | // fetchDescription fetches and parses the frontmatter description for a skill. |
| 677 | func fetchDescription(client *api.Client, host, owner, repo string, skill *Skill) string { |
| 678 | if skill.BlobSHA == "" { |
| 679 | return "" |
| 680 | } |
| 681 | content, err := FetchBlob(client, host, owner, repo, skill.BlobSHA) |
| 682 | if err != nil { |
| 683 | return "" |
| 684 | } |
| 685 | result, err := frontmatter.Parse(content.Raw()) |
| 686 | if err != nil { |
| 687 | return "" |
| 688 | } |
| 689 | return result.Metadata.Description |
| 690 | } |
| 691 | |
| 692 | // FetchDescriptionsConcurrent fetches descriptions with bounded concurrency. |
| 693 | func FetchDescriptionsConcurrent(client *api.Client, host, owner, repo string, skills []Skill, onProgress func(done, total int)) { |
no test coverage detected