Skip to content
Snippets Groups Projects
Commit 509201c9 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Handle ssh git origin urls for generating the build config

In case the repo isn't pulled through https.
parent 7118764a
No related branches found
No related tags found
No related merge requests found
Pipeline #10178 passed with warnings
......@@ -133,6 +133,11 @@ function getBuildInfo() {
let commit = child_process.execSync('git rev-parse --short HEAD').toString().trim();
let parsed = url.parse(remote);
// convert git urls
if (parsed.protocol === null) {
parsed = url.parse('git://' + remote.replace(":", "/"));
parsed.protocol = 'https:';
}
let newPath = parsed.path.slice(0, parsed.path.lastIndexOf('.'));
let newUrl = parsed.protocol + '//' + parsed.host + newPath + '/commit/' + commit;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment