diff --git a/module/gitlab/model.php b/module/gitlab/model.php index 3ad8662b2e..0320cd7472 100644 --- a/module/gitlab/model.php +++ b/module/gitlab/model.php @@ -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. *