mirror of
https://github.com/github/awesome-copilot.git
synced 2026-02-20 02:15:12 +00:00
Merge pull request #718 from github/copilot/sub-pr-717
Fix plugin path detection in getResourceType for deep-linking
This commit is contained in:
@@ -233,7 +233,10 @@ export function getResourceType(filePath: string): string {
|
||||
return "skill";
|
||||
if (/(^|\/)hooks\//.test(filePath) && filePath.endsWith("README.md"))
|
||||
return "hook";
|
||||
if (filePath.endsWith(".collection.yml")) return "plugin";
|
||||
// Check for plugin directories (e.g., plugins/<id>, plugins/<id>/)
|
||||
if (/(^|\/)plugins\/[^/]+\/?$/.test(filePath)) return "plugin";
|
||||
// Check for plugin.json files (e.g., plugins/<id>/.github/plugin/plugin.json)
|
||||
if (filePath.endsWith("/.github/plugin/plugin.json")) return "plugin";
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user