fetchDescription fetches and parses the frontmatter description for a skill.
(client *api.Client, host, owner, repo string, skill *Skill)
| 620 | |
| 621 | // fetchDescription fetches and parses the frontmatter description for a skill. |
| 622 | func fetchDescription(client *api.Client, host, owner, repo string, skill *Skill) string { |
| 623 | if skill.BlobSHA == "" { |
| 624 | return "" |
| 625 | } |
| 626 | content, err := FetchBlob(client, host, owner, repo, skill.BlobSHA) |
| 627 | if err != nil { |
| 628 | return "" |
| 629 | } |
| 630 | result, err := frontmatter.Parse(content) |
| 631 | if err != nil { |
| 632 | return "" |
| 633 | } |
| 634 | return result.Metadata.Description |
| 635 | } |
| 636 | |
| 637 | // FetchDescriptionsConcurrent fetches descriptions with bounded concurrency. |
| 638 | func FetchDescriptionsConcurrent(client *api.Client, host, owner, repo string, skills []Skill, onProgress func(done, total int)) { |
no test coverage detected