Gogs integration

This commit is contained in:
Simon Vieille 2016-12-05 00:58:11 +01:00
commit 32054ee565
14 changed files with 117 additions and 33 deletions

View file

@ -315,6 +315,7 @@ class ProjectController extends PHPCI\Controller
'github' => Lang::get('github'),
'bitbucket' => Lang::get('bitbucket'),
'gitlab' => Lang::get('gitlab'),
'gogs' => Lang::get('gogs'),
'remote' => Lang::get('remote'),
'local' => Lang::get('local'),
'hg' => Lang::get('hg'),
@ -322,7 +323,7 @@ class ProjectController extends PHPCI\Controller
);
$field = Form\Element\Select::create('type', Lang::get('where_hosted'), true);
$field->setPattern('^(github|bitbucket|gitlab|remote|local|hg|svn)');
$field->setPattern('^(github|bitbucket|gitlab|gogs|remote|local|hg|svn)');
$field->setOptions($options);
$field->setClass('form-control')->setContainerClass('form-group');
$form->addField($field);
@ -425,6 +426,10 @@ class ProjectController extends PHPCI\Controller
'regex' => '/^(git|https?):\/\//',
'message' => Lang::get('error_remote')
),
'gogs' => array(
'regex' => '/^(git|https?):\/\//',
'message' => Lang::get('error_remote')
),
'gitlab' => array(
'regex' => '`^(.*)@(.*):(.*)/(.*)\.git`',
'message' => Lang::get('error_gitlab')