Browse Source

fixed 提交者匹配用户email

pull/343/head
xxq250 3 years ago
parent
commit
bea6442a1c
1 changed files with 10 additions and 2 deletions
  1. +10
    -2
      app/helpers/repositories_helper.rb

+ 10
- 2
app/helpers/repositories_helper.rb View File

@@ -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…
Cancel
Save