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