mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-19 03:05:57 +08:00
Merge branch 'develop' of https://git.trustie.net/Gitlink/forgeplus into develop
This commit is contained in:
@@ -442,6 +442,14 @@ module ApplicationHelper
|
||||
User.find_by(gitea_uid: gitea_uid)
|
||||
end
|
||||
|
||||
def find_user_in_redis_cache(login, email)
|
||||
$redis_cache.hgetall("v2-owner-common:#{login}-#{email}")
|
||||
end
|
||||
|
||||
def find_user_in_redis_cache_by_id(id)
|
||||
$redis_cache.hgetall("v2-owner-common:#{id}")
|
||||
end
|
||||
|
||||
def render_base64_decoded(str)
|
||||
return nil if str.blank?
|
||||
Base64.decode64 str
|
||||
|
||||
@@ -35,6 +35,16 @@ module RepositoriesHelper
|
||||
end
|
||||
end
|
||||
|
||||
def render_cache_commit_author(author_json)
|
||||
Rails.logger.info author_json['Email']
|
||||
if author_json["name"].present? && author_json["email"].present?
|
||||
return 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'])
|
||||
end
|
||||
end
|
||||
|
||||
def readme_render_decode64_content(str, path)
|
||||
return nil if str.blank?
|
||||
begin
|
||||
|
||||
Reference in New Issue
Block a user