(ref: RepoRef, branch: string, filePath: string)
| 239 | } |
| 240 | |
| 241 | export function getRawFileUrl(ref: RepoRef, branch: string, filePath: string): string { |
| 242 | if (ref.provider === "gitlab") { |
| 243 | return `https://gitlab.com/${ref.fullPath}/-/raw/${branch}/${filePath}`; |
| 244 | } |
| 245 | return `https://raw.githubusercontent.com/${ref.owner}/${ref.repo}/${branch}/${filePath}`; |
| 246 | } |
| 247 | |
| 248 | export function getCdnFileUrl(ref: RepoRef, branch: string, filePath: string): string | null { |
| 249 | if (ref.provider === "github") { |
no outgoing calls
no test coverage detected