mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-20 19:55:56 +08:00
Merge branch 'standalone_develop' into pre_trustie_server
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
json.total_count @result_object[:total_data].to_i
|
||||
json.contributors @result_object[:data].each do |contributor|
|
||||
result_arr = @result_object[:data]
|
||||
result_arr = result_arr.sort_by!{|c| User.develop_score(c["commits"])}.reverse
|
||||
json.contributors result_arr.each do |contributor|
|
||||
user = $redis_cache.hgetall("v2-owner-common:#{contributor["name"]}-#{contributor["email"]}")
|
||||
if user.blank?
|
||||
json.score 300
|
||||
json.score User.develop_score(contributor["commits"])
|
||||
json.contributions contributor["commits"]
|
||||
json.additions contributor["additions"]
|
||||
json.deletions contributor["deletions"]
|
||||
@@ -13,7 +15,7 @@ json.contributors @result_object[:data].each do |contributor|
|
||||
json.name contributor["name"]
|
||||
json.image_url User::Avatar.get_letter_avatar_url(contributor["name"])
|
||||
else
|
||||
json.score User.develop_score(user["id"])
|
||||
json.score User.develop_score(contributor["commits"])
|
||||
json.contributions contributor["commits"]
|
||||
json.additions contributor["additions"]
|
||||
json.deletions contributor["deletions"]
|
||||
|
||||
Reference in New Issue
Block a user