From 3d24ed3780dffd0f4aac7a77db2faa62bc68b766 Mon Sep 17 00:00:00 2001 From: xxq250 Date: Tue, 18 Apr 2023 17:02:37 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E5=9B=BEcommit=E8=A1=A5=E5=85=85,mess?= =?UTF-8?q?age=E9=95=BF=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/tasks/commit_log_to_db.rake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tasks/commit_log_to_db.rake b/lib/tasks/commit_log_to_db.rake index cfde9bd05..cc6cdcd23 100644 --- a/lib/tasks/commit_log_to_db.rake +++ b/lib/tasks/commit_log_to_db.rake @@ -29,7 +29,7 @@ namespace :commit_log_to_db do commit_sha = commit['sha'] next if CommitLog.find_by(commit_id: commit_sha).present? ref = "master" - commit_message = commit['commit']['message'].to_s.size > 2000 ? "Message Data too long" : commit['commit']['message'].to_s.gsub("/n","").gsub("\"","") + commit_message = commit['commit']['message'].to_s.size > 1000 ? "Message Data too long" : commit['commit']['message'].to_s.gsub("/n","").gsub("\"","") user = User.find_by(mail: commiter['email']) user_id = user&.id || project.user_id commit_date = Time.parse(commit['commit']['author']['date']) @@ -67,7 +67,7 @@ namespace :commit_log_to_db do commit_sha = commit['sha'] next if CommitLog.find_by(commit_id: commit_sha).present? ref = "master" - commit_message = commit['commit']['message'].to_s.size > 2000 ? "Message Data too long" : commit['commit']['message'].to_s.gsub("/n","").gsub("\"","") + commit_message = commit['commit']['message'].to_s.size > 1000 ? "Message Data too long" : commit['commit']['message'].to_s.gsub("/n","").gsub("\"","") user = User.find_by(mail: commiter['email']) user_id = user&.id || project.user_id commit_date = Time.parse(commit['commit']['author']['date'])