mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-20 11:43:06 +08:00
Merge branch 'develop' into standalone_develop
This commit is contained in:
26
app/views/api/v1/projects/contributors/stat.json.jbuilder
Normal file
26
app/views/api/v1/projects/contributors/stat.json.jbuilder
Normal file
@@ -0,0 +1,26 @@
|
||||
json.total_count @result_object[:total_data].to_i
|
||||
json.contributors @result_object[:data].each do |contributor|
|
||||
user = $redis_cache.hgetall("v2-owner-common:#{contributor["name"]}-#{contributor["email"]}")
|
||||
if user.blank?
|
||||
json.contributions contributor["commits"]
|
||||
json.additions contributor["additions"]
|
||||
json.deletions contributor["deletions"]
|
||||
# json.id contributor["id"]
|
||||
json.login contributor["name"]
|
||||
json.email contributor["email"]
|
||||
json.type nil
|
||||
json.name contributor["name"]
|
||||
json.image_url User::Avatar.get_letter_avatar_url(contributor["name"])
|
||||
else
|
||||
json.contributions contributor["commits"]
|
||||
json.additions contributor["additions"]
|
||||
json.deletions contributor["deletions"]
|
||||
json.id user["id"]
|
||||
json.login user["login"]
|
||||
json.email user["email"]
|
||||
json.name user["name"]
|
||||
json.type user["type"]
|
||||
json.name user["name"]
|
||||
json.image_url user["avatar_url"]
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user