提交总数接口获取修改

This commit is contained in:
huang 2016-01-12 11:01:58 +08:00
parent 500527a12d
commit 83881766b2
2 changed files with 2 additions and 3 deletions

View File

@ -357,7 +357,7 @@ update
@changesets = g.commits(@project.gpid, :ref_name => @rev)
# @changesets = @repository.latest_changesets(@path, @rev)
# @changesets_count = @repository.latest_changesets(@path, @rev).count
@changesets_all_count = @project.gpid.nil? ? 0 : g.commits_total_count(@project.gpid).count
@changesets_all_count = @project.gpid.nil? ? 0 : g.project(@project.gpid).commit_count
@changesets_latest_coimmit = @changesets[0]
@properties = @repository.properties(@path, @rev)
@repositories = @project.repositories

View File

@ -2784,8 +2784,7 @@ int main(int argc, char** argv){
#代码提交数量
def changesets_num project
g = Gitlab.client
project.gpid.nil? ? 0 : g.commits_total_count(project.gpid).count
# # commits_total_count(project.gpid)
project.gpid.nil? ? 0 : g.project(project.gpid).commit_count
# project.changesets.count
end
end