fetchSkills method
Fetch multiple skills from a repository
repo Repository in format 'owner/repo'
skillNames List of skill names to fetch
branch Git branch to fetch from (default: 'main')
Implementation
Future<List<Skill>> fetchSkills(
String repo,
List<String> skillNames, {
String branch = 'main',
}) async {
final skills = <Skill>[];
for (final skillName in skillNames) {
try {
final skill = await fetchSkill(repo, skillName, branch: branch);
skills.add(skill);
} catch (e) {
// Continue fetching other skills even if one fails
// TODO: Add logging
continue;
}
}
return skills;
}