mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-24 05:35:46 +08:00
统计提交数
This commit is contained in:
@@ -13,6 +13,7 @@ namespace :total_commit_count do
|
|||||||
projects.each_with_index do |project, index|
|
projects.each_with_index do |project, index|
|
||||||
result = Gitea::Repository::Commits::ListService.call(project.owner.login,project.identifier,sha: "", page: 1, limit: 5, token: project.owner.gitea_token)
|
result = Gitea::Repository::Commits::ListService.call(project.owner.login,project.identifier,sha: "", page: 1, limit: 5, token: project.owner.gitea_token)
|
||||||
total_count = result[:total_count]
|
total_count = result[:total_count]
|
||||||
|
next if total_count > 2000
|
||||||
puts "#{index} total_count==========#{total_count}"
|
puts "#{index} total_count==========#{total_count}"
|
||||||
if total_count > 50
|
if total_count > 50
|
||||||
total_page = (total_count / 50) + 1
|
total_page = (total_count / 50) + 1
|
||||||
@@ -22,6 +23,7 @@ namespace :total_commit_count do
|
|||||||
else
|
else
|
||||||
add_commit_to_index(project, 1)
|
add_commit_to_index(project, 1)
|
||||||
end
|
end
|
||||||
|
puts "#{index} date_count_hash===========#{@date_count_hash.to_json}"
|
||||||
|
|
||||||
end
|
end
|
||||||
puts "@date_count_hash===========#{@date_count_hash.to_json}"
|
puts "@date_count_hash===========#{@date_count_hash.to_json}"
|
||||||
|
|||||||
Reference in New Issue
Block a user