diff --git a/module/gitlab/control.php b/module/gitlab/control.php index 7c8d75630e..0193f67792 100644 --- a/module/gitlab/control.php +++ b/module/gitlab/control.php @@ -349,4 +349,25 @@ class gitlab extends control } return $this->send($options); } + + /** + * AJAX: Get project branches. + * + * @param int $gitlabID + * @param int $projectID + * @access public + * @return object + */ + public function ajaxGetProjectBranches($gitlabID, $projectID) + { + if(!$gitlabID or !$projectID) return $this->send(array('message' => array())); + + $branches = $this->gitlab->apiGetBranches($gitlabID, $projectID); + $options = ""; + foreach($branches as $index =>$branch) + { + $options .= ""; + } + return $this->send($options); + } }