commit提取贡献者创建时间

This commit is contained in:
xxq250 2023-04-19 20:25:07 +08:00
parent b55137f874
commit 68a4575476
1 changed files with 1 additions and 1 deletions

View File

@ -95,7 +95,7 @@ namespace :batch_add_contributors do
sql_connection.begin_db_transaction sql_connection.begin_db_transaction
site = Site.find_by_sql("select id, created_at from commit_contributors where name='#{commiter['email']}'") site = Site.find_by_sql("select id, created_at from commit_contributors where name='#{commiter['email']}'")
if site.present? if site.present?
puts "commit_date====#{commit_date},created_at======#{site.created_at}" puts "commit_date====#{commit_date},created_at======#{site.first&.created_at}"
if commit_date.to_i < site.created_at.to_i if commit_date.to_i < site.created_at.to_i
sql = "update commit_contributors set created_at ='#{commit_date_str}' where name='#{commiter['email']}'" sql = "update commit_contributors set created_at ='#{commit_date_str}' where name='#{commiter['email']}'"
end end