|
|
|
@@ -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? |
|
|
|
|