@devries-cameron20 / t3code Mirror · read-only / commits / 220e573b14
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 24, 16:30 UTC

fix(shared): detect Azure DevOps SSH remotes (ssh.dev.azure.com) (#6187)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Arham Amin committed Aug 11, 2026 at 21:44 UTC 220e573b14cea84b6662a7d69047129047433b63
2 files changed +25 -1
packages/shared/src/sourceControl.test.ts
+16
@@ -57,6 +57,22 @@ describe("detectSourceControlProviderFromRemoteUrl", () => {
57 ).toBe("bitbucket");
58 });
59
60 + it("detects Azure DevOps SSH remotes", () => {
61 + // The default Azure DevOps SSH clone URL uses the ssh.dev.azure.com host.
62 + expect(
63 + detectSourceControlProviderFromRemoteUrl("git@ssh.dev.azure.com:v3/org/project/repo")?.kind,
64 + ).toBe("azure-devops");
65 + expect(
66 + detectSourceControlProviderFromRemoteUrl("ssh://git@ssh.dev.azure.com:22/v3/org/project/repo")
67 + ?.kind,
68 + ).toBe("azure-devops");
69 + // Legacy visualstudio.com SSH host stays classified too.
70 + expect(
71 + detectSourceControlProviderFromRemoteUrl("git@vs-ssh.visualstudio.com:v3/org/project/repo")
72 + ?.kind,
73 + ).toBe("azure-devops");
74 + });
75 +
76 it("preserves ports while classifying by hostname", () => {
77 expect(
78 detectSourceControlProviderFromRemoteUrl("https://gitlab.com:8443/group/repo.git"),
packages/shared/src/sourceControl.ts
+9 -1
@@ -176,7 +176,15 @@ function isGitLabHost(host: string): boolean {
176 }
177
178 function isAzureDevOpsHost(host: string): boolean {
179 - return host === "dev.azure.com" || host.endsWith(".visualstudio.com");
179 + // `ssh.dev.azure.com` is the default Azure DevOps SSH clone host
180 + // (git@ssh.dev.azure.com:v3/org/project/repo), so match any `*.dev.azure.com`
181 + // subdomain, not just the bare `dev.azure.com`. Legacy hosts stay under
182 + // `.visualstudio.com` (including `vs-ssh.visualstudio.com`).
183 + return (
184 + host === "dev.azure.com" ||
185 + host.endsWith(".dev.azure.com") ||
186 + host.endsWith(".visualstudio.com")
187 + );
188 }
189
190 function isBitbucketHost(host: string): boolean {