MCPcopy
hub / github.com/github/awesome-copilot / getExternalPluginUrl

Function getExternalPluginUrl

website/src/scripts/pages/plugins-render.ts:50–57  ·  view source on GitHub ↗
(plugin: RenderablePlugin)

Source from the content-addressed store, hash-verified

48}
49
50function getExternalPluginUrl(plugin: RenderablePlugin): string {
51 if (plugin.source?.source === 'github' && plugin.source.repo) {
52 const base = `https://github.com/${plugin.source.repo}`;
53 return plugin.source.path && plugin.source.path !== '/' ? `${base}/tree/main/${plugin.source.path}` : base;
54 }
55
56 return sanitizeUrl(plugin.repository || plugin.homepage);
57}
58
59export function renderPluginsHtml(items: RenderablePlugin[]): string {
60 if (items.length === 0) {

Callers 1

renderPluginsHtmlFunction · 0.70

Calls 1

sanitizeUrlFunction · 0.90

Tested by

no test coverage detected