From 3240f516c8febc0675dedd68c2c2221d993f1cda Mon Sep 17 00:00:00 2001 From: Jan Keromnes Date: Tue, 1 Feb 2022 16:01:59 +0000 Subject: [PATCH] [server] Support 'git@{host}:{user}/{repo}.git' format in context URLs --- components/server/src/workspace/context-parser.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/server/src/workspace/context-parser.ts b/components/server/src/workspace/context-parser.ts index ac7bfffcacb93f..ea1956f3e8d80a 100644 --- a/components/server/src/workspace/context-parser.ts +++ b/components/server/src/workspace/context-parser.ts @@ -32,6 +32,9 @@ export abstract class AbstractContextParser implements IContextParser { if (url.startsWith(`${this.host}/`)) { url = `https://${url}`; } + if (url.startsWith(`git@${this.host}:`)) { + return `https://${this.host}/` + url.slice(`git@${this.host}:`.length); + } if (url.startsWith(`https://${this.host}/`)) { return url; }