| Module | Gitlab::Client::Branches |
| In: |
lib/gitlab/client/branches.rb
|
Defines methods related to repositories. @see github.com/gitlabhq/gitlabhq/blob/master/doc/api/branches.md
Gets information about a repository branch.
@example
Gitlab.branch(3, 'api') Gitlab.repo_branch(5, 'master')
@param [Integer] project The ID of a project. @param [String] branch The name of the branch. @return [Gitlab::ObjectifiedHash]
Gets a list of project repositiory branches.
@example
Gitlab.branches(42)
@param [Integer] project The ID of a project. @param [Hash] options A customizable set of options. @option options [Integer] :page The page number. @option options [Integer] :per_page The number of results per page. @return [Array<Gitlab::ObjectifiedHash>]
Creates a repository branch. Requires Gitlab >= 6.8.x
@example
Gitlab.create_branch(3, 'api') Gitlab.repo_create_branch(5, 'master')
@param [Integer] project The ID of a project. @param [String] branch The name of the new branch. @param [String] ref Create branch from commit sha or existing branch @return [Gitlab::ObjectifiedHash]
Deletes a repository branch. Requires Gitlab >= 6.8.x
@example
Gitlab.delete_branch(3, 'api') Gitlab.repo_delete_branch(5, 'master')
@param [Integer] project The ID of a project. @param [String] branch The name of the branch to delete @return [Gitlab::ObjectifiedHash]
Protects a repository branch.
@example
Gitlab.protect_branch(3, 'api') Gitlab.repo_protect_branch(5, 'master')
@param [Integer] project The ID of a project. @param [String] branch The name of the branch. @return [Gitlab::ObjectifiedHash]
Unprotects a repository branch.
@example
Gitlab.unprotect_branch(3, 'api') Gitlab.repo_unprotect_branch(5, 'master')
@param [Integer] project The ID of a project. @param [String] branch The name of the branch. @return [Gitlab::ObjectifiedHash]