Skip to content

Commit

Permalink
fix(gitlab): parser: fix double backslash if no subgroup
Browse files Browse the repository at this point in the history
  • Loading branch information
dsevillamartin committed Jun 19, 2018
1 parent 9796079 commit 67f7cbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Gitlab/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = (str) => {
const domain = url && url[2];
const parsed = regex.exec(str.replace(urlRegex, ''));

const repo = parsed && `${parsed[1]}/${parsed[2]}/${parsed[3]}`;
const repo = parsed && `${parsed[1]}/${parsed[2] && `${parsed[2]}/`}${parsed[3]}`;

return parsed ? {
repo,
Expand Down

0 comments on commit 67f7cbc

Please sign in to comment.