|
|
|
@ -348,8 +348,10 @@ update
|
|
|
|
|
# (show_error_not_found; return) unless @entries
|
|
|
|
|
g = Gitlab.client
|
|
|
|
|
@changesets = g.commits(@project.gpid, :ref_name => @rev)
|
|
|
|
|
g_project = g.project(@project.gpid)
|
|
|
|
|
# 总的提交数
|
|
|
|
|
@changesets_all_count = @project.gpid.nil? ? 0 : g.project(@project.gpid).commit_count
|
|
|
|
|
@changesets_all_count = @project.gpid.nil? ? 0 : g_project.commit_count
|
|
|
|
|
@g_default_branch = g_project.default_branch.nil? ? "master" : g_project.default_branch
|
|
|
|
|
# 访问该页面的是会后则刷新
|
|
|
|
|
if @project.project_score.nil?
|
|
|
|
|
ProjectScore.create(:project_id => @project.id, :score => false)
|
|
|
|
@ -579,7 +581,9 @@ update
|
|
|
|
|
if rep_static.nil?
|
|
|
|
|
RepStatics.create(:project_id => @project.id, :uname => static.uname, :commits_num => static.commits_num, :email => static.email, :add => static.add, :del => static.del, :changeset => static.changes)
|
|
|
|
|
else
|
|
|
|
|
rep_static.update_attributes(:uname => static.uname, :commits_num => static.commits_num, :email => static.email, :add => static.add, :del => static.del, :changeset => static.changes)
|
|
|
|
|
if @rev == params[:default_branch]
|
|
|
|
|
rep_static.update_attributes(:uname => static.uname, :commits_num => static.commits_num, :email => static.email, :add => static.add, :del => static.del, :changeset => static.changes)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
# @static_month__per_user = g.rep_stats(project_id, :rev => rev, :creator => creator, :period => 2)
|
|
|
|
|