修复:最新贡献者读取规则

This commit is contained in:
yystopf 2023-03-28 15:15:08 +08:00
parent 6a6a257d2a
commit 6992bf4959
1 changed files with 5 additions and 3 deletions

View File

@ -1,14 +1,16 @@
user = $redis_cache.hgetall("v2-owner-common:#{contributor["name"]}-#{contributor["email"]}")
if user.blank?
json.contributions contributor["contributions"]
json.contributions contributor["commits"]
# json.gid contributor["id"]
json.login contributor["name"].downcase
json.login nil
json.type nil
json.name contributor["name"].downcase
json.email contributor["email"]
json.image_url User::Avatar.get_letter_avatar_url(contributor["name"])
json.contribution_perc User.new(login: contributor["name"], mail: contributor["email"]).simple_contribution_perc(project, contributor["contribution_perc"])
else
json.contributions contributor["contributions"]
json.contributions contributor["commits"]
json.id user["id"]
# json.gid contributor["id"]
json.login user["login"].downcase
json.type user["type"]