fix: normalization

This commit is contained in:
Tomasz Stefaniak 2025-10-16 16:38:45 -07:00
parent ca9224a26d
commit 63ac02ba95
2 changed files with 16 additions and 0 deletions

View file

@ -443,6 +443,14 @@ export class VsCodeMessenger {
);
}
// Convert SSH protocol to HTTPS: ssh://git@github.com/owner/repo.git -> https://github.com/owner/repo
// Also handles: ssh://git@github.com:owner/repo.git (less common)
if (normalized.startsWith("ssh://git@github.com")) {
normalized = normalized
.replace("ssh://git@github.com/", "https://github.com/")
.replace("ssh://git@github.com:", "https://github.com/");
}
// Convert shorthand owner/repo to full URL
if (
normalized.includes("/") &&

View file

@ -32,6 +32,14 @@ const normalizeRepoUrl = (url: string | undefined | null): string => {
normalized = normalized.replace("git@github.com:", "https://github.com/");
}
// Convert SSH protocol to HTTPS: ssh://git@github.com/owner/repo.git -> https://github.com/owner/repo
// Also handles: ssh://git@github.com:owner/repo.git (less common)
if (normalized.startsWith("ssh://git@github.com")) {
normalized = normalized
.replace("ssh://git@github.com/", "https://github.com/")
.replace("ssh://git@github.com:", "https://github.com/");
}
// Convert shorthand owner/repo to full URL
if (
normalized.includes("/") &&