MCPcopy Create free account
hub / github.com/github/awesome-copilot / readPluginJson

Function readPluginJson

eng/update-readme.mjs:717–725  ·  view source on GitHub ↗

* Read and parse a plugin.json file from a plugin directory.

(pluginDir)

Source from the content-addressed store, hash-verified

715 * Read and parse a plugin.json file from a plugin directory.
716 */
717function readPluginJson(pluginDir) {
718 const jsonPath = path.join(pluginDir, ".github/plugin", "plugin.json");
719 if (!fs.existsSync(jsonPath)) return null;
720 try {
721 return JSON.parse(fs.readFileSync(jsonPath, "utf-8"));
722 } catch {
723 return null;
724 }
725}
726
727/**
728 * Generate the plugins section with a table of all plugins

Callers 2

generatePluginsSectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected