Skip to content

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

Merged
juliusmarminge merged 1 commit into
pingdotgg:mainfrom
arhxam:fix/azure-devops-ssh-detection
Aug 11, 2026
Merged

fix(shared): detect Azure DevOps SSH remotes (ssh.dev.azure.com)#6187
juliusmarminge merged 1 commit into
pingdotgg:mainfrom
arhxam:fix/azure-devops-ssh-detection

Conversation

@arhxam

@arhxam arhxam commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

What Changed

isAzureDevOpsHost (packages/shared/src/sourceControl.ts) now matches any *.dev.azure.com subdomain, not just the bare dev.azure.com. Added a test.

Why

The default Azure DevOps Git SSH clone URL is git@ssh.dev.azure.com:v3/{org}/{project}/{repo}, whose host is ssh.dev.azure.com — which is neither exactly dev.azure.com nor a .visualstudio.com domain. None of the other detectors match it either (they look for the substrings github/gitlab/bitbucket), so detectSourceControlProviderFromRemoteUrl classified every Azure DevOps SSH remote as kind: "unknown", even though the HTTPS remote for the same repo resolves to azure-devops.

The leading dot in .endsWith(".dev.azure.com") keeps this tight — evil-dev.azure.com.attacker.test still does not match — and the legacy vs-ssh.visualstudio.com SSH host stays classified via the existing .visualstudio.com suffix.

Verified: the new test fails on the current code and passes with the change (confirmed by reverting only the source and re-running); full packages/shared toolchain green (vp test, tsgo, vp lint, vp fmt).

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • No UI changes

Note

Low Risk
Small, targeted hostname rule change with new unit tests; no auth or data-path changes.

Overview
Azure DevOps SSH clone URLs (git@ssh.dev.azure.com:v3/...) were classified as unknown because host detection only matched dev.azure.com and *.visualstudio.com, not ssh.dev.azure.com or other *.dev.azure.com hosts.

isAzureDevOpsHost now also treats hosts ending in .dev.azure.com as Azure DevOps (with the leading dot kept to avoid overly broad matches). Tests cover default SSH, ssh:// with port, and legacy vs-ssh.visualstudio.com.

Reviewed by Cursor Bugbot for commit 24807c6. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Fix Azure DevOps SSH remote detection for ssh.dev.azure.com hosts

Expands isAzureDevOpsHost in sourceControl.ts to match hosts ending with .dev.azure.com (e.g. ssh.dev.azure.com), in addition to the existing dev.azure.com and *.visualstudio.com patterns. A new test case covers both ssh:// and scp-like SSH clone URL forms.

Macroscope summarized 24807c6.

`isAzureDevOpsHost` only matched the exact host `dev.azure.com` and any
`.visualstudio.com` domain. But the default Azure DevOps Git *SSH* clone URL is
`git@ssh.dev.azure.com:v3/{org}/{project}/{repo}`, whose host is
`ssh.dev.azure.com` — neither `dev.azure.com` nor a `.visualstudio.com` domain.
None of the other host detectors match it either (they look for the substrings
`github`/`gitlab`/`bitbucket`), so `detectSourceControlProviderFromRemoteUrl`
classified every Azure DevOps SSH remote as `kind: "unknown"`, while the HTTPS
remote for the same repo resolved to `azure-devops`.

Match any `*.dev.azure.com` subdomain in addition to the bare apex. The leading
dot keeps this tight — `evil-dev.azure.com.attacker.test` still does not match —
and the legacy `vs-ssh.visualstudio.com` SSH host stays classified via the
existing `.visualstudio.com` suffix.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2f539c5d-fa27-42ce-b93b-55f058d3c730

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Aug 11, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved 24807c6

This PR adds a simple condition to recognize Azure DevOps SSH remotes (*.dev.azure.com subdomains) in the host detection function. The change is additive, well-tested, and self-contained with no impact on existing behavior.

You can customize Macroscope's approvability policy. Learn more.

@juliusmarminge
juliusmarminge enabled auto-merge (squash) August 11, 2026 15:51
@juliusmarminge
juliusmarminge merged commit 220e573 into pingdotgg:main Aug 11, 2026
17 of 18 checks passed
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Aug 11, 2026
## What's Changed
* feat(web): make environment artwork theme aware by @juliusmarminge in pingdotgg/t3code#6183
* fix(shared): normalize a bare Windows drive root the same as C:\ / C:/ by @arhxam in pingdotgg/t3code#6189
* fix(shared): detect Azure DevOps SSH remotes (ssh.dev.azure.com) by @arhxam in pingdotgg/t3code#6187
* feat(web): add back buttons for the pull requests and usage pages in the sidebar footer by @UtkarshUsername in pingdotgg/t3code#6031
* fix(web): render dropdowns above toasts by @Brechard in pingdotgg/t3code#6165
* fix(web): thread error banner dismiss survives reconnect and rerenders by @myacoub91 in pingdotgg/t3code#6123
* fix(web): use a clearer pull action icon by @extoci in pingdotgg/t3code#6194
* feat(web): use OKLCH for theme palettes by @StiensWout in pingdotgg/t3code#6036

## New Contributors
* @extoci made their first contribution in pingdotgg/t3code#6194

**Full Changelog**: pingdotgg/t3code@v0.0.34-nightly.20260811.1068...v0.0.34-nightly.20260811.1069

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.34-nightly.20260811.1069
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants