Add source control settings discovery
This commit is contained in:
1 parent
25058ddfe5
commit
e1626fd742
14 files changed
+644
-3
No files matched your search
@@ -38,6 +38,10 @@ function isAzureDevOpsHost(host: string): boolean {
|
||||
return host === "dev.azure.com" || host.endsWith(".visualstudio.com");
|
||||
}
|
||||
|
||||
function isBitbucketHost(host: string): boolean {
|
||||
return host === "bitbucket.org" || host.includes("bitbucket");
|
||||
}
|
||||
|
||||
export function detectSourceControlProviderFromRemoteUrl(
|
||||
remoteUrl: string,
|
||||
): SourceControlProviderInfo | null {
|
||||
@@ -70,6 +74,14 @@ export function detectSourceControlProviderFromRemoteUrl(
|
||||
};
|
||||
}
|
||||
|
||||
if (isBitbucketHost(host)) {
|
||||
return {
|
||||
kind: "bitbucket",
|
||||
name: host === "bitbucket.org" ? "Bitbucket" : "Bitbucket Self-Hosted",
|
||||
baseUrl: toBaseUrl(host),
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
kind: "unknown",
|
||||
name: host,
|
||||
|
||||
Reference in new issue
Block a user