+ Add getBranches functions.

This commit is contained in:
dingguodong
2021-08-20 15:13:30 +08:00
parent 84b7170f9c
commit 2056fc52ff
+20
View File
@@ -306,6 +306,26 @@ class gitlabModel extends model
return $refList;
}
/**
* Get branches.
*
* @param int $gitlabID
* @param int $projectID
* @access public
* @return array
*/
public function getBranches($gitlabID, $projectID)
{
$rawBranches = $this->apiGetBranches($gitlabID, $projectID);
$branches = array();
foreach($rawBranches as $branch)
{
$branches[] = $branch->name;
}
return $branches;
}
/**
* Create a gitlab.
*