* Add tips when gitlab has not pipelines.

This commit is contained in:
caoyanyi
2022-08-15 09:14:50 +08:00
parent d7a8b587db
commit 6afa13390f
2 changed files with 35 additions and 0 deletions
+17
View File
@@ -2879,4 +2879,21 @@ class gitlabModel extends model
$html .= '</div>';
return $html;
}
/**
* Get pipeline with api.
*
* @param int $gitlabID
* @param int $projectID
* @param string $branch
* @access public
* @return void
*/
public function apiGetPipeline($gitlabID, $projectID, $branch)
{
$apiRoot = $this->getApiRoot($gitlabID);
$url = sprintf($apiRoot, "/projects/$projectID/pipelines") . "&ref=$branch";
a($url);
return json_decode(commonModel::http($url));
}
}