贡献者数量调整

This commit is contained in:
xxq250 2023-07-07 17:13:43 +08:00
parent fc4520c06f
commit a40c5a7619
1 changed files with 3 additions and 0 deletions

View File

@ -176,6 +176,9 @@ class RepositoriesController < ApplicationController
result = Gitea::Repository::Contributors::GetService.call(@owner, @repository.identifier, {page: params[:page], limit: params[:limit]})
@total_count = result[:total_count]
@contributors = result.is_a?(Hash) ? result[:body] : []
add_contributors_count = EduSetting.get("ProjectAddContributors-#{@project.id}")
@total_count = @total_count + add_contributors_count.to_i
end
rescue
@contributors = []