* Add tips when gitlab has not pipelines.
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user