Added GitLab infos (WebHook url) in the project page if it's a GitLab's project

This commit is contained in:
a.cianfarani 2013-09-19 09:34:51 +02:00
parent 19c643032e
commit 4cad2b4078

View file

@ -17,8 +17,8 @@
<li><a href="#" id="delete-project"><i class="icon-trash"></i> Delete Project</a></li>
<?php endif; ?>
</ul>
<?php if (in_array($project->getType(), array('github', 'bitbucket'))): ?>
<?php if (in_array($project->getType(), array('github', 'gitlab','bitbucket'))): ?>
<br>
<p class="alert alert-info">To automatically build this project when new commits are pushed, add the URL below
<?php endif; ?>
@ -31,6 +31,11 @@
print ' as a "WebHook URL" in the <a href="https://github.com/' . $project->getReference() . '/settings/hooks">Service Hooks</a> section of your Github repository.<br><br><strong style="word-wrap: break-word;">' . $url . '</strong>';
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.<br><br><strong style="word-wrap: break-word;">' . $url . '</strong>';
break;
case 'bitbucket':
$url = (empty($_SERVER['HTTPS']) ? 'http' : 'https') . '://' . $_SERVER['HTTP_HOST'] . '/bitbucket/webhook/' . $project->getId();
print ' as a "POST" service in the <a href="https://bitbucket.org/' . $project->getReference() . '/admin/services">Services</a> section of your Bitbucket repository.<br><br><strong style="word-wrap: break-word;">' . $url . '</strong>';