From 4cad2b407824900967bcd708552fb63dfea98aac Mon Sep 17 00:00:00 2001 From: "a.cianfarani" Date: Thu, 19 Sep 2013 09:34:51 +0200 Subject: [PATCH 1/2] Added GitLab infos (WebHook url) in the project page if it's a GitLab's project --- PHPCI/View/Project/view.phtml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/PHPCI/View/Project/view.phtml b/PHPCI/View/Project/view.phtml index 3067f5ed..a34a0e57 100644 --- a/PHPCI/View/Project/view.phtml +++ b/PHPCI/View/Project/view.phtml @@ -17,8 +17,8 @@
  • Delete Project
  • - - getType(), array('github', 'bitbucket'))): ?> + + getType(), array('github', 'gitlab','bitbucket'))): ?>

    To automatically build this project when new commits are pushed, add the URL below @@ -31,6 +31,11 @@ print ' as a "WebHook URL" in the Service Hooks section of your Github repository.

    ' . $url . ''; break; + case 'gitlab': + $url = (empty($_SERVER['HTTPS']) ? 'http' : 'https') . '://' . $_SERVER['HTTP_HOST'] . '/gitlab/webhook/' . $project->getId(); + print ' as a "WebHook URL" in the Web Hooks section of your Gitlab repository.

    ' . $url . ''; + break; + case 'bitbucket': $url = (empty($_SERVER['HTTPS']) ? 'http' : 'https') . '://' . $_SERVER['HTTP_HOST'] . '/bitbucket/webhook/' . $project->getId(); print ' as a "POST" service in the Services section of your Bitbucket repository.

    ' . $url . ''; From e91b9426e0e98839ebc452ad00f900564aaa0e90 Mon Sep 17 00:00:00 2001 From: "a.cianfarani" Date: Thu, 19 Sep 2013 09:46:29 +0200 Subject: [PATCH 2/2] Correct indentation --- PHPCI/View/Project/view.phtml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/PHPCI/View/Project/view.phtml b/PHPCI/View/Project/view.phtml index a34a0e57..45c390bb 100644 --- a/PHPCI/View/Project/view.phtml +++ b/PHPCI/View/Project/view.phtml @@ -17,7 +17,7 @@

  • Delete Project
  • - + getType(), array('github', 'gitlab','bitbucket'))): ?>

    To automatically build this project when new commits are pushed, add the URL below @@ -31,10 +31,10 @@ print ' as a "WebHook URL" in the Service Hooks section of your Github repository.

    ' . $url . ''; break; - case 'gitlab': - $url = (empty($_SERVER['HTTPS']) ? 'http' : 'https') . '://' . $_SERVER['HTTP_HOST'] . '/gitlab/webhook/' . $project->getId(); - print ' as a "WebHook URL" in the Web Hooks section of your Gitlab repository.

    ' . $url . ''; - break; + case 'gitlab': + $url = (empty($_SERVER['HTTPS']) ? 'http' : 'https') . '://' . $_SERVER['HTTP_HOST'] . '/gitlab/webhook/' . $project->getId(); + print ' as a "WebHook URL" in the Web Hooks section of your Gitlab repository.

    ' . $url . ''; + break; case 'bitbucket': $url = (empty($_SERVER['HTTPS']) ? 'http' : 'https') . '://' . $_SERVER['HTTP_HOST'] . '/bitbucket/webhook/' . $project->getId();