添加commit总数 api

This commit is contained in:
huang 2015-12-17 18:28:12 +08:00
parent 2d2329a1e0
commit 1dae37f613
1 changed files with 17 additions and 0 deletions

View File

@ -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