Merge branch 'devops17' into 'devops17_46138'
# Conflicts: # module/gitlab/lang/en.php # module/gitlab/lang/zh-cn.php # module/group/lang/resource.php
This commit is contained in:
@@ -858,7 +858,6 @@ class gitlab extends control
|
||||
$branchPriv->mergeAccessLevel = 40; // Initialize data, and the operation authority is the maintainers by default.
|
||||
$branchPriv->pushAccessLevel = 40; // Initialize data, and the operation authority is the maintainers by default.
|
||||
|
||||
$gitlab = $this->gitlab->getByID($gitlabID);
|
||||
$title = $this->lang->gitlab->createBranchPriv;
|
||||
|
||||
if($branch)
|
||||
@@ -881,7 +880,6 @@ class gitlab extends control
|
||||
|
||||
$this->view->title = $this->lang->gitlab->common . $this->lang->colon . $title;
|
||||
$this->view->pageTitle = $title;
|
||||
$this->view->gitlab = $gitlab;
|
||||
$this->view->gitlabID = $gitlabID;
|
||||
$this->view->branch = $branch;
|
||||
$this->view->projectID = $projectID;
|
||||
@@ -1328,4 +1326,36 @@ class gitlab extends control
|
||||
}
|
||||
$this->send($options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a gitlab tag.
|
||||
*
|
||||
* @param int $gitlabID
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function createTag($gitlabID, $projectID)
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
$this->gitlab->createTag($gitlabID, $projectID);
|
||||
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('browseTag', "gitlabID=$gitlabID&projectID=$projectID")));
|
||||
}
|
||||
|
||||
$gitlabBranches = $this->gitlab->apiGetBranches($gitlabID, $projectID);
|
||||
$branches = array();
|
||||
foreach($gitlabBranches as $branch)
|
||||
{
|
||||
$branches[$branch->name] = $branch->name;
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->gitlab->common . $this->lang->colon . $this->lang->gitlab->createTag;
|
||||
$this->view->gitlabID = $gitlabID;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->branches = $branches;
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user