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

getBuildInfo: handle http URLs without a .git suffix

parent c554fd62
No related branches found
No related tags found
No related merge requests found
Pipeline #189703 passed
...@@ -14,7 +14,7 @@ export function getBuildInfo(build) { ...@@ -14,7 +14,7 @@ export function getBuildInfo(build) {
} }
let parsed = url.parse(remote); let parsed = url.parse(remote);
let newPath = parsed.path.slice(0, parsed.path.lastIndexOf('.')); let newPath = parsed.path.slice(0, parsed.path.lastIndexOf('.') > -1 ? parsed.path.lastIndexOf('.') : undefined);
let newUrl = parsed.protocol + '//' + parsed.host + newPath + '/commit/' + commit; let newUrl = parsed.protocol + '//' + parsed.host + newPath + '/commit/' + commit;
return { return {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment