Github issues迁移,用户名处理, 限流需要请求等待

This commit is contained in:
xxq250 2023-12-15 15:59:27 +08:00
parent 1eb18e4036
commit 505d873ea6
1 changed files with 2 additions and 0 deletions

View File

@ -144,6 +144,7 @@ namespace :batch_add_issues do
if total_count > 100
total_page = (total_count / 100) + 1
total_page.times do |i|
sleep 30.seconds
add_github_issues_to_project(project, i + 1 + count)
end
else
@ -218,6 +219,7 @@ namespace :batch_add_issues do
end
issue_number = issue['number']
sleep 3.seconds
# comment_api_url = "https://gitee.com/api/v5/repos/mindspore/mindspore/issues/#{issue_number}/comments?access_token=96a637aa055f15056e77e3cf11a67525&page=1&per_page=100&order=asc"
comment_api_url = "https://api.github.com/repos/OpenXiangShan/XiangShan/issues/#{issue_number}/comments?page=1&per_page=100"
comment_uri = URI.parse(comment_api_url)