commit提取贡献者创建时间

This commit is contained in:
xxq250 2023-04-19 20:14:20 +08:00
parent d890e01aed
commit 77b4b51c42
1 changed files with 2 additions and 1 deletions

View File

@ -11,7 +11,8 @@ namespace :batch_add_contributors do
projects = Project.where(identifier: ['MindSpore-first-experience', ' MindSpore-install', 'MindSpore-Application-practice', 'MindSpore-Model-Development', 'MindSpore-Data-preprocessing', 'Mindspore-Data-storage-use', 'MindSpore-Data-storage-kunpeng', 'MindSpore-LeNet-jzx3', 'MindSpore-competition'] )
end
projects.each_with_index do |project, index|
result = Gitea::Repository::Contributors::GetService.call(@owner, @repository.identifier, {page: params[:page], limit: params[:limit]})
# result = Gitea::Repository::Contributors::GetService.call(project.owner, project.repository.identifier, {page: params[:page], limit: params[:limit]})
result = Gitea::Repository::Commits::ListService.call(project.owner.login,project.identifier,sha: "", page: 1, limit: 200, token: project.owner.gitea_token)
# @total_count = result[:total_count]
# @contributors = result.is_a?(Hash) ? result[:body] : []
next if result.blank? || result[:total_count].blank?