(plugin: InstallablePlugin)
| 33 | * Extract GitHub repo info from a plugin's source |
| 34 | */ |
| 35 | export function extractGitHubRepo(plugin: InstallablePlugin): string | null { |
| 36 | const isGitHub = plugin.entry.source && typeof plugin.entry.source === 'object' && 'source' in plugin.entry.source && plugin.entry.source.source === 'github'; |
| 37 | if (isGitHub && typeof plugin.entry.source === 'object' && 'repo' in plugin.entry.source) { |
| 38 | return plugin.entry.source.repo; |
| 39 | } |
| 40 | return null; |
| 41 | } |
| 42 | |
| 43 | /** |
| 44 | * Build menu options for plugin details view with scoped installation options |
no outgoing calls
no test coverage detected