Skip to content

Commit

Permalink
[server] Support 'git@{host}:{user}/{repo}.git' format in context URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
jankeromnes authored and roboquat committed Feb 1, 2022
1 parent ed8a3dc commit 3240f51
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions components/server/src/workspace/context-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3240f51

Please sign in to comment.