Function
toRawAssetUrl
(item: Extension, assetPath: string | null | undefined)
Source from the content-addressed store, hash-verified
| 83 | } |
| 84 | |
| 85 | function toRawAssetUrl(item: Extension, assetPath: string | null | undefined): string { |
| 86 | if (!assetPath || !item.ref) return ""; |
| 87 | if (/^https?:\/\//i.test(assetPath)) return assetPath; |
| 88 | return `https://raw.githubusercontent.com/github/awesome-copilot/${item.ref}/${assetPath.replace( |
| 89 | /\\/g, |
| 90 | "/" |
| 91 | )}`; |
| 92 | } |
| 93 | |
| 94 | function getGalleryImages(item: Extension): string[] { |
| 95 | const images: string[] = []; |
Tested by
no test coverage detected