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")