上线测试
This commit is contained in:
parent
e673540323
commit
747493993b
|
@ -22,10 +22,10 @@ module ProjectScoreHelper
|
|||
|
||||
#代码提交数量
|
||||
def changesets_num project
|
||||
# g = Gitlab.client
|
||||
# project.gpid.nil? ? 0 : g.commits_total_count(project.gpid)
|
||||
g = Gitlab.client
|
||||
project.gpid.nil? ? 0 : g.commits_total_count(project.gpid)
|
||||
# # commits_total_count(project.gpid)
|
||||
project.changesets.count
|
||||
# project.changesets.count
|
||||
end
|
||||
|
||||
#讨论区帖子数量
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
class AddCommitsCountToProjects < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :projects, :commits_count, :integer, default: 0
|
||||
end
|
||||
end
|
|
@ -0,0 +1,18 @@
|
|||
# #coding=utf-8
|
||||
#
|
||||
# namespace :projects do
|
||||
# desc "sync some projects which just have sigle repository"
|
||||
# task :commits_count => :environment do
|
||||
# projects = Project.where("gpid is not null")
|
||||
# puts projects.count
|
||||
# projects.each do |project|
|
||||
# unless project.gpid.nil?
|
||||
# count =
|
||||
# end
|
||||
#
|
||||
# end
|
||||
# end
|
||||
#
|
||||
# task :delete_rep => :environment do
|
||||
# end
|
||||
# end
|
Loading…
Reference in New Issue