diff --git a/lib/Gitlab/Api/Repositories.php b/lib/Gitlab/Api/Repositories.php index 91e991855..7fb8f2e98 100644 --- a/lib/Gitlab/Api/Repositories.php +++ b/lib/Gitlab/Api/Repositories.php @@ -61,6 +61,14 @@ public function blob($project_id, $sha, $filepath) )); } + public function getFile($project_id, $file_path, $ref) + { + return $this->get('projects/'.urlencode($project_id).'/repository/files', array( + 'file_path' => $file_path, + 'ref' => $ref + )); + } + public function createFile($project_id, $file_path, $content, $branch_name, $commit_message) { return $this->post('projects/'.urlencode($project_id).'/repository/files', array(