(ref: RepoRef, branch: string)
| 216 | } |
| 217 | |
| 218 | export function getPublicZipUrl(ref: RepoRef, branch: string): string { |
| 219 | if (ref.provider === "gitlab") { |
| 220 | return `https://gitlab.com/${ref.fullPath}/-/archive/${branch}/${ref.repo}-${branch}.zip`; |
| 221 | } |
| 222 | return `https://github.com/${ref.owner}/${ref.repo}/archive/refs/heads/${branch}.zip`; |
| 223 | } |
| 224 | |
| 225 | export function getAuthenticatedZipUrl(ref: RepoRef, branch: string): string | null { |
| 226 | const token = localStorage.getItem(getAuthTokenKey(ref)); |
no outgoing calls
no test coverage detected