forked from Trustie/forgeplus
fixed 提交者匹配用户email
This commit is contained in:
parent
67d7d11c62
commit
6b68de130c
|
@ -36,12 +36,20 @@ module RepositoriesHelper
|
|||
end
|
||||
|
||||
def render_cache_commit_author(author_json)
|
||||
user = nil
|
||||
if author_json["name"].present? && author_json["email"].present?
|
||||
return find_user_in_redis_cache(author_json['name'], author_json['email'])
|
||||
user = find_user_in_redis_cache(author_json['name'], author_json['email'])
|
||||
end
|
||||
if author_json["Name"].present? && author_json["Email"].present?
|
||||
return find_user_in_redis_cache(author_json['Name'], author_json['Email'])
|
||||
user = find_user_in_redis_cache(author_json['Name'], author_json['Email'])
|
||||
end
|
||||
if user.blank? && author_json["email"].present?
|
||||
user = User.find_by(mail: author_json["email"])
|
||||
end
|
||||
if user.blank? && author_json["Email"].present?
|
||||
user = User.find_by(mail: author_json["Email"])
|
||||
end
|
||||
user
|
||||
end
|
||||
|
||||
def readme_render_decode64_content(str, owner, repo, ref, path)
|
||||
|
|
Loading…
Reference in New Issue