| Module | Gitlab::Client::Repositories |
| In: |
lib/gitlab/client/repositories.rb
|
Defines methods related to repositories. @see github.com/gitlabhq/gitlabhq/blob/master/doc/api/repositories.md
Compares branches, tags or commits.
@example
Gitlab.compare(42, 'master', 'feature/branch') Gitlab.repo_compare(42, 'master', 'feature/branch')
@param [Integer] project The ID of a project. @param [String] from The commit SHA or branch name of from branch. @param [String] to The commit SHA or branch name of to branch. @return [Gitlab::ObjectifiedHash]
Get the contents of a file
@example
Gitlab.file_contents(42, 'Gemfile') Gitlab.repo_file_contents(3, 'Gemfile', 'ed899a2f4b50b4370feeea94676502b42383c746')
@param [Integer] project The ID of a project. @param [String] filepath The relative path of the file in the repository @param [String] ref The name of a repository branch or tag or if not given the default branch. @return [String]
Get file tree project (root level).
@example
Gitlab.tree(42)
Gitlab.tree(42, { path: 'Gemfile' })
@param [Integer] project The ID of a project. @param [Hash] options A customizable set of options. @option options [String] :path The path inside repository. @option options [String] :ref_name The name of a repository branch or tag. @return [Gitlab::ObjectifiedHash]