This commit is contained in:
lichengjun
2021-06-19 15:28:05 +08:00
+7 -7
View File
@@ -362,7 +362,6 @@ class gitlabModel extends model
$url = sprintf($apiRoot, $apiPath);
$response = commonModel::http($url, $postData);
return $response;
}
/**
@@ -469,8 +468,6 @@ class gitlabModel extends model
}
return false;
}
/**
@@ -508,18 +505,21 @@ class gitlabModel extends model
$apiRoot = $this->getApiRoot($gitlabID);
$apiPath = "/projects/{$projectID}/issues/";
$url = sprintf($apiRoot, $apiPath);
$response = commonModel::http($url, $issue);
$response = json_decode(commonModel::http($url, $issue));
return $response;
}
public function pushTask($task, $gitlabID,$projectID)
public function pushTask($gitlabID, $projectID, $task)
{
$task->label = $this->config->gitlab->taskLabel->name;
$response = $this->apiCreateIssue($gitlabID, $projectID, $task);
return $response;
}
public function pushBug($bug, $gitlabID,$projectID)
public function pushBug($gitlabID, $projectID, $bug)
{
$bug->label = $this->config->gitlab->bugLabel->name;
$response = $this->apiCreateIssue($gitlabID, $projectID, $bug);
return $response;
}
}