fixed 提交日志记录用户信息
This commit is contained in:
parent
25375b32c2
commit
07ec114e9a
|
@ -5,8 +5,8 @@ class CommitLogsController < ApplicationController
|
||||||
ref = params[:ref]
|
ref = params[:ref]
|
||||||
commit_id = params[:commits][0][:id]
|
commit_id = params[:commits][0][:id]
|
||||||
message = params[:commits][0][:message]
|
message = params[:commits][0][:message]
|
||||||
user_name = params[:commits][0][:committer][:username]
|
user_name = params[:pusher][:login]
|
||||||
user_mail = params[:commits][0][:committer][:email]
|
user_mail = params[:pusher][:email]
|
||||||
user = User.find_by(mail: user_mail)
|
user = User.find_by(mail: user_mail)
|
||||||
user = User.find_by(login: user_name) if user.blank?
|
user = User.find_by(login: user_name) if user.blank?
|
||||||
|
|
||||||
|
|
|
@ -374,7 +374,7 @@ class Project < ApplicationRecord
|
||||||
logger.info "########namespace_path: #{namespace_path} ########identifier: #{identifier} "
|
logger.info "########namespace_path: #{namespace_path} ########identifier: #{identifier} "
|
||||||
|
|
||||||
user = Owner.find_by_login namespace_path
|
user = Owner.find_by_login namespace_path
|
||||||
user = Owner.new(login: namespace_path) if user.nil?
|
user = User.new(login: namespace_path) if user.nil?
|
||||||
project = user&.projects&.find_by(identifier: identifier) || Project.find_by(identifier: "#{namespace_path}/#{identifier}")
|
project = user&.projects&.find_by(identifier: identifier) || Project.find_by(identifier: "#{namespace_path}/#{identifier}")
|
||||||
return nil if project.blank?
|
return nil if project.blank?
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue