You can not select more than 25 topics
Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- json.total_count @result_object[:total_data].to_i
- 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 User.develop_score(contributor["commits"])
- 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.score User.develop_score(contributor["commits"])
- 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
|