* Adjsut unit case.

This commit is contained in:
liyuchun
2022-01-18 09:03:24 +08:00
parent 5724bd4fc5
commit 72d551598b
4 changed files with 57 additions and 4 deletions
+7 -1
View File
@@ -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分支
+6 -1
View File
@@ -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标签