mirror of
https://github.com/github/awesome-copilot.git
synced 2026-02-20 02:15:12 +00:00
Update eng/validate-collections.mjs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -243,10 +243,14 @@ function validateCollectionItems(items) {
|
||||
i + 1
|
||||
} kind is "agent" but path doesn't end with .agent.md`;
|
||||
}
|
||||
if (item.kind === "hook" && !item.path.endsWith(".hook.md")) {
|
||||
return `Item ${
|
||||
i + 1
|
||||
} kind is "hook" but path doesn't end with .hook.md`;
|
||||
if (item.kind === "hook") {
|
||||
const isValidHookPath =
|
||||
item.path.startsWith("hooks/") && item.path.endsWith("/README.md");
|
||||
if (!isValidHookPath) {
|
||||
return `Item ${
|
||||
i + 1
|
||||
} kind is "hook" but path must be hooks/<hook>/README.md`;
|
||||
}
|
||||
}
|
||||
|
||||
// Validate agent-specific frontmatter
|
||||
|
||||
Reference in New Issue
Block a user