From 9dd8de07dc5e1dcc7e60d8e4b995d941470aa351 Mon Sep 17 00:00:00 2001 From: xxq250 Date: Thu, 23 Mar 2023 17:37:00 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=8F=90=E4=BA=A4=E6=95=B0?= =?UTF-8?q?=20log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/tasks/total_commit_count.rake | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/tasks/total_commit_count.rake b/lib/tasks/total_commit_count.rake index 5b7351825..5be659db4 100644 --- a/lib/tasks/total_commit_count.rake +++ b/lib/tasks/total_commit_count.rake @@ -12,6 +12,7 @@ namespace :total_commit_count do # projects = Project.where(:name => 'opensource0311') 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) + next if result.blank? || result[:total_count].blank? total_count = result[:total_count] next if total_count > 2000 puts "#{index} total_count==========#{total_count}"