+ Add getBranches functions.
This commit is contained in:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user