( provider: Provider, app_mode: "saas" | "oss" | undefined, )
| 168 | }; |
| 169 | |
| 170 | export const shouldUseInstallationRepos = ( |
| 171 | provider: Provider, |
| 172 | app_mode: "saas" | "oss" | undefined, |
| 173 | ) => { |
| 174 | if (!provider) return false; |
| 175 | |
| 176 | switch (provider) { |
| 177 | case "bitbucket": |
| 178 | case "bitbucket_data_center": |
| 179 | return true; |
| 180 | case "gitlab": |
| 181 | return false; |
| 182 | case "azure_devops": |
| 183 | return false; |
| 184 | case "github": |
| 185 | return app_mode === "saas"; |
| 186 | default: |
| 187 | return false; |
| 188 | } |
| 189 | }; |
| 190 | |
| 191 | export const ensureHttpsPrefix = (host?: string | null): string => { |
| 192 | if (!host || host.trim() === "") return ""; |
no outgoing calls
no test coverage detected