From 7d51829e3c40a1a161cd8c904a6203a862a62ffb Mon Sep 17 00:00:00 2001 From: xxq250 Date: Wed, 19 Apr 2023 20:17:46 +0800 Subject: [PATCH] =?UTF-8?q?commit=E6=8F=90=E5=8F=96=E8=B4=A1=E7=8C=AE?= =?UTF-8?q?=E8=80=85=E5=88=9B=E5=BB=BA=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/tasks/batch_add_contributors.rake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/tasks/batch_add_contributors.rake b/lib/tasks/batch_add_contributors.rake index 2649fa67..f6feb332 100644 --- a/lib/tasks/batch_add_contributors.rake +++ b/lib/tasks/batch_add_contributors.rake @@ -33,7 +33,7 @@ namespace :batch_add_contributors do # "luoyuan " commit_author = "#{commiter['name']} <#{commiter['email']}>" commit_sha = commit['sha'] - next if CommitLog.find_by(commit_id: commit_sha).present? + # next if CommitLog.find_by(commit_id: commit_sha).present? ref = "master" commit_message = commit['commit']['message'].to_s.size > 200 ? "Message Data too long" : commit['commit']['message'].to_s.gsub("/n","").gsub("\"","") # user = User.find_by(mail: commiter['email']) @@ -83,11 +83,11 @@ namespace :batch_add_contributors do # "luoyuan " commit_author = "#{commiter['name']} <#{commiter['email']}>" commit_sha = commit['sha'] - next if CommitLog.find_by(commit_id: commit_sha).present? + # next if CommitLog.find_by(commit_id: commit_sha).present? ref = "master" commit_message = commit['commit']['message'].to_s.size > 200 ? "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 + # user = User.find_by(mail: commiter['email']) + # user_id = user&.id || project.user_id commit_date = Time.parse(commit['commit']['author']['date']) commit_date_str = commit_date.strftime("%Y-%m-%d %H:%M:%S")