|
|
|
@@ -6,12 +6,7 @@ if user.blank? |
|
|
|
json.type nil |
|
|
|
json.name contributor["login"] |
|
|
|
json.image_url User::Avatar.get_letter_avatar_url(contributor["login"]) |
|
|
|
if @cache_result.present? |
|
|
|
db_user = User.find_by_id(contributor["id"]) |
|
|
|
if db_user.present? |
|
|
|
json.contribution_perc db_user.contribution_perc(project) |
|
|
|
end |
|
|
|
end |
|
|
|
json.contribution_perc User.new(login: contributor["login"], mail: contributor["email"]).simple_contribution_perc(project) |
|
|
|
else |
|
|
|
json.contributions contributor["contributions"] |
|
|
|
# json.gid contributor["id"] |
|
|
|
@@ -21,6 +16,6 @@ else |
|
|
|
json.image_url user["avatar_url"] |
|
|
|
db_user = User.find_by_id(user["id"]) |
|
|
|
if db_user.present? |
|
|
|
json.contribution_perc db_user.contribution_perc(project) |
|
|
|
json.contribution_perc db_user.simple_contribution_perc(project) |
|
|
|
end |
|
|
|
end |