添加commit总数 api
This commit is contained in:
parent
2d2329a1e0
commit
1dae37f613
|
@ -58,6 +58,23 @@ class Gitlab::Client
|
|||
end
|
||||
alias_method :repo_commits, :commits
|
||||
|
||||
# Gets a list of project commits.
|
||||
#
|
||||
# @example
|
||||
# Gitlab.commits('viking')
|
||||
# Gitlab.repo_commits('gitlab', :ref_name => 'api')
|
||||
#
|
||||
# @param [Integer] project The ID of a project.
|
||||
# @param [Hash] options A customizable set of options.
|
||||
# @option options [String] :ref_name The branch or tag name of a project repository.
|
||||
# @option options [Integer] :page The page number.
|
||||
# @option options [Integer] :per_page The number of results per page.
|
||||
# @return [Array<Gitlab::ObjectifiedHash>]
|
||||
def commits_total_count(project, options={})
|
||||
get("/projects/#{project}/repository/commits_total_count", :query => options)
|
||||
end
|
||||
alias_method :repo_commits, :commits_total_count
|
||||
|
||||
# Gets a specific commit identified by the commit hash or name of a branch or tag.
|
||||
#
|
||||
# @example
|
||||
|
|
Loading…
Reference in New Issue