Browse Source

commit提取贡献者创建时间

pull/330/head
xxq250 3 years ago
parent
commit
77b4b51c42
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      lib/tasks/batch_add_contributors.rake

+ 2
- 1
lib/tasks/batch_add_contributors.rake 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?


Loading…
Cancel
Save