Add source control settings discovery

This commit is contained in:
Julius Marminge authored and Julius Marminge committed 2026-05-02 14:22:14 -07:00
1 parent 25058ddfe5
commit e1626fd742
14 files changed
+644 -3

No files matched your search

+12
View File
@@ -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,