Skip to content

Commit 16267e0

Browse files
committed
[protocol] Make ContextURL.parseToURL support the newly-accepted 'git@{host}:{user}/{repo}.git' format
Fixes #8097 Companion to #7951
1 parent 462e269 commit 16267e0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

components/gitpod-protocol/src/context-url.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ export namespace ContextURL {
3131
if (!rest.startsWith("http")) {
3232
rest = 'https://' + rest;
3333
}
34+
if (/^git@[^:\/]+:/.test(rest)) {
35+
rest = rest.replace(/^git@([^:\/]+):/, 'https://$1/');
36+
}
3437
return new URL(rest);
3538
};
3639

0 commit comments

Comments
 (0)