Browse Source

Merge branch 'standalone_develop' into trustie_server

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

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

@@ -29,7 +29,7 @@ namespace :commit_log_to_db do
commit_sha = commit['sha'] 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" 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 = User.find_by(mail: commiter['email'])
user_id = user&.id || project.user_id user_id = user&.id || project.user_id
commit_date = Time.parse(commit['commit']['author']['date']) commit_date = Time.parse(commit['commit']['author']['date'])
@@ -67,7 +67,7 @@ namespace :commit_log_to_db do
commit_sha = commit['sha'] 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" 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 = User.find_by(mail: commiter['email'])
user_id = user&.id || project.user_id user_id = user&.id || project.user_id
commit_date = Time.parse(commit['commit']['author']['date']) commit_date = Time.parse(commit['commit']['author']['date'])


Loading…
Cancel
Save