Skip to content

Commit e87503c

Browse files
committed
fix: map ssh.bitbucket.org remotes to bitbucket.org web URLs (#2801)
1 parent 9d168f0 commit e87503c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎src/Models/Remote.cs‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ public bool TryGetVisitURL(out string url)
8282
if (match.Success)
8383
{
8484
var host = match.Groups[1].Value;
85+
86+
// Bitbucket Cloud serves SSH from `ssh.bitbucket.org`, but its web pages live on `bitbucket.org`.
87+
if (host.Equals("ssh.bitbucket.org", StringComparison.Ordinal))
88+
host = "bitbucket.org";
89+
8590
var supportHTTPS = HTTPSValidator.IsSupported(host);
8691
var scheme = supportHTTPS ? "https" : "http";
8792
url = $"{scheme}://{host}/{match.Groups[2].Value}";

0 commit comments

Comments
 (0)