Browse Source

修复: 贡献者大小写无法正常匹配

pull/342/head
yystopf 3 years ago
parent
commit
6a6a257d2a
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      app/views/repositories/_contributor.json.jbuilder

+ 4
- 4
app/views/repositories/_contributor.json.jbuilder View File

@@ -2,17 +2,17 @@ user = $redis_cache.hgetall("v2-owner-common:#{contributor["name"]}-#{contributo
if user.blank?
json.contributions contributor["contributions"]
# json.gid contributor["id"]
json.login contributor["name"]
json.login contributor["name"].downcase
json.type nil
json.name contributor["name"]
json.name contributor["name"].downcase
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.gid contributor["id"]
json.login user["login"]
json.login user["login"].downcase
json.type user["type"]
json.name user["name"]
json.name user["name"].downcase
json.image_url user["avatar_url"]
db_user = User.find_by_id(user["id"])
json.contribution_perc db_user.simple_contribution_perc(project, contributor["contribution_perc"]) if db_user.present?


Loading…
Cancel
Save