Browse Source

贡献者数量调整

pull/342/head
xxq250 3 years ago
parent
commit
a40c5a7619
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      app/controllers/repositories_controller.rb

+ 3
- 0
app/controllers/repositories_controller.rb 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 = []


Loading…
Cancel
Save