Browse Source

commit提取贡献者创建时间

pull/330/head
xxq250 3 years ago
parent
commit
fe294e6fed
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      lib/tasks/batch_add_contributors.rake

+ 2
- 2
lib/tasks/batch_add_contributors.rake View File

@@ -43,7 +43,7 @@ namespace :batch_add_contributors do
site = Site.find_by_sql("select id, created_at from commit_contributors where name='#{commiter['email']}'")
if site.present?
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.first&.created_at.to_i
sql = "update commit_contributors set created_at ='#{commit_date_str}' where name='#{commiter['email']}'"
end
else
@@ -98,7 +98,7 @@ namespace :batch_add_contributors do

if site.present?
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.first&.created_at.to_i
sql = "update commit_contributors set created_at ='#{commit_date_str}' where name='#{commiter['email']}'"
end
else


Loading…
Cancel
Save