* Adjsut unit case.
This commit is contained in:
@@ -40,7 +40,13 @@ r($result) && p() && e('return false'); //使用正确的gitlabID、分支信息
|
||||
|
||||
dao::$errors = array();
|
||||
$projectID = 1555;
|
||||
$result = $gitlab->createBranch($gitlabID, $projectID);
|
||||
|
||||
/* Delete branches with the same name. */
|
||||
$apiRoot = $gitlab->getApiRoot($gitlabID);
|
||||
$url = sprintf($apiRoot, "/projects/{$projectID}/repository/branches/{$_POST['branch']}");
|
||||
commonModel::http($url, array(), $options = array(CURLOPT_CUSTOMREQUEST => 'DELETE'));
|
||||
|
||||
$result = $gitlab->createBranch($gitlabID, $projectID);
|
||||
if($result === true) $result = 'return true';
|
||||
r($result) && p() && e('return true'); //通过gitlabID,projectID,分支对象正确创建GitLab分支
|
||||
|
||||
|
||||
@@ -40,7 +40,12 @@ r($result) && p() && e('return false'); //使用正确的gitlabID、标签信息
|
||||
|
||||
dao::$errors = array();
|
||||
$projectID = 1555;
|
||||
$result = $gitlab->createTag($gitlabID, $projectID);
|
||||
|
||||
/* Delete branches with the same name. */
|
||||
$gitlab->apiDeleteTagPriv($gitlabID, $projectID, $_POST['tag_name']);
|
||||
$gitlab->apiDeleteTag($gitlabID, $projectID, $_POST['tag_name']);
|
||||
|
||||
$result = $gitlab->createTag($gitlabID, $projectID);
|
||||
if($result === true) $result = 'return true';
|
||||
r($result) && p() && e('return true'); //通过gitlabID,projectID,标签对象正确创建GitLab标签
|
||||
|
||||
|
||||
Reference in New Issue
Block a user