更改:贡献者获取规则以及分支列表同步旧版

This commit is contained in:
2023-02-23 11:38:16 +08:00
parent 54b7cef1bd
commit de1e931c2f
5 changed files with 42 additions and 20 deletions

View File

@@ -1,15 +1,15 @@
user = $redis_cache.hgetall("v2-owner-common:#{contributor["login"]}-#{contributor["email"]}")
user = $redis_cache.hgetall("v2-owner-common:#{contributor["name"]}-#{contributor["email"]}")
if user.blank?
json.contributions contributor["contributions"]
# json.gid contributor["id"]
json.login contributor["login"]
json.contributions contributor["commits"]
# json.id contributor["id"]
json.name contributor["name"]
json.type nil
json.name contributor["login"]
json.image_url User::Avatar.get_letter_avatar_url(contributor["login"])
json.name contributor["name"]
json.image_url User::Avatar.get_letter_avatar_url(contributor["name"])
else
json.contributions contributor["contributions"]
# json.gid contributor["id"]
json.login user["login"]
json.contributions contributor["commits"]
json.id user["id"]
json.name user["name"]
json.type user["type"]
json.name user["name"]
json.image_url user["avatar_url"]

View File

@@ -1,4 +1,4 @@
total_count = @contributors.size
total_count = @total_count
json.list @contributors.each do |contributor|
json.partial! 'contributor', locals: { contributor: contributor }
end