mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-20 11:45:57 +08:00
新增:贡献者分页
This commit is contained in:
@@ -166,8 +166,9 @@ class RepositoriesController < ApplicationController
|
||||
if params[:filepath].present? || @project.educoder?
|
||||
@contributors = []
|
||||
else
|
||||
result = Gitea::Repository::Contributors::GetService.call(@owner, @repository.identifier)
|
||||
@contributors = result.is_a?(Hash) && result.key?(:status) ? [] : result
|
||||
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] : []
|
||||
end
|
||||
rescue
|
||||
@contributors = []
|
||||
|
||||
Reference in New Issue
Block a user