mirror of
https://github.com/github/awesome-copilot.git
synced 2026-02-23 03:45:13 +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
|
i + 1
|
||||||
} kind is "agent" but path doesn't end with .agent.md`;
|
} kind is "agent" but path doesn't end with .agent.md`;
|
||||||
}
|
}
|
||||||
if (item.kind === "hook" && !item.path.endsWith(".hook.md")) {
|
if (item.kind === "hook") {
|
||||||
return `Item ${
|
const isValidHookPath =
|
||||||
i + 1
|
item.path.startsWith("hooks/") && item.path.endsWith("/README.md");
|
||||||
} kind is "hook" but path doesn't end with .hook.md`;
|
if (!isValidHookPath) {
|
||||||
|
return `Item ${
|
||||||
|
i + 1
|
||||||
|
} kind is "hook" but path must be hooks/<hook>/README.md`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate agent-specific frontmatter
|
// Validate agent-specific frontmatter
|
||||||
|
|||||||
Reference in New Issue
Block a user