From ffea28596222b13e926588a2e7cd432ebe6db835 Mon Sep 17 00:00:00 2001 From: xxq250 Date: Mon, 17 Apr 2023 14:08:20 +0800 Subject: [PATCH] =?UTF-8?q?rake=20commit=5Flog=5Fto=5Fdb=20=E6=94=BE?= =?UTF-8?q?=E8=A1=8C=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/tasks/commit_log_to_db.rake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tasks/commit_log_to_db.rake b/lib/tasks/commit_log_to_db.rake index bd45d91ce..a85084c74 100644 --- a/lib/tasks/commit_log_to_db.rake +++ b/lib/tasks/commit_log_to_db.rake @@ -25,7 +25,7 @@ namespace :commit_log_to_db do commit_author = "#{commiter['name']} <#{commiter['email']}>" commit_sha = commit['sha'] ref = "master" - commit_message = commit['commit']['message'] + commit_message = commit['commit']['message'].to_s.gsub("/n","") user = User.find_by(mail: commiter['email']) commit_date = Time.parse(commit['commit']['author']['date']) commit_date_str = commit_date.strftime("%a %b %d %H:%M:%S") @@ -59,7 +59,7 @@ namespace :commit_log_to_db do commit_author = "#{commiter['name']} <#{commiter['email']}>" commit_sha = commit['sha'] ref = "master" - commit_message = commit['commit']['message'] + commit_message = commit['commit']['message'].to_s.gsub("/n","") user = User.find_by(mail: commiter['email']) commit_date = Time.parse(commit['commit']['author']['date']) commit_date_str = commit_date.strftime("%Y-%m-%d %H:%M:%S")