From d2505dcef6598cbd72dc8dfe895e667621d6d237 Mon Sep 17 00:00:00 2001 From: Alex Davyskiba Date: Sat, 13 Dec 2014 10:00:12 +0200 Subject: [PATCH] Update Gitlab URL parsing to no longer require a project namespace. Closes #702 --- PHPCI/Service/ProjectService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PHPCI/Service/ProjectService.php b/PHPCI/Service/ProjectService.php index a0b4837f..22e940ac 100644 --- a/PHPCI/Service/ProjectService.php +++ b/PHPCI/Service/ProjectService.php @@ -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);