Update Gitlab URL parsing to no longer require a project namespace.

Closes #702
This commit is contained in:
Alex Davyskiba 2014-12-13 10:00:12 +02:00 committed by Dan Cryer
parent e4bf5ee27d
commit d2505dcef6

View file

@ -115,12 +115,12 @@ class ProjectService
if ($project->getType() == 'gitlab') {
$info = array();
if (preg_match('`^(.*)@(.*):([0-9]+)?/?(.*)/(.*)\.git`', $reference, $matches)) {
if (preg_match('`^(.+)@(.+):([0-9]*)\/?(.+)\.git`', $reference, $matches)) {
$info['user'] = $matches[1];
$info['domain'] = $matches[2];
$info['port'] = $matches[3];
$project->setReference($matches[4] . '/' . $matches[5]);
$project->setReference($matches[4]);
}
$project->setAccessInformation($info);