+ Add apiGetSingleBranch function.

This commit is contained in:
dingguodong
2021-08-24 17:35:17 +08:00
parent 4f94bcafc5
commit 8a6ef83c49
+15
View File
@@ -470,6 +470,21 @@ class gitlabModel extends model
return json_decode(commonModel::http($url));
}
/**
* Get single branch by API.
*
* @param int $gitlabID
* @param int $projectID
* @param string $branch
* @access public
* @return object
*/
public function apiGetSingleBranch($gitlabID, $projectID, $branch)
{
$url = sprintf($this->getApiRoot($gitlabID), "/projects/$projectID/repository/branches/$branch");
return json_decode(commonModel::http($url));
}
/**
* Get Forks of a project by API.
*