From b80ed537fcf9b05a4311b94fe19c3ddf247ce9f9 Mon Sep 17 00:00:00 2001 From: xxq250 Date: Fri, 15 Dec 2023 17:04:53 +0800 Subject: [PATCH] =?UTF-8?q?Github=20issues=E8=BF=81=E7=A7=BB,=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=90=8D=E5=A4=84=E7=90=86,=20=E9=99=90=E6=B5=81?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E8=AF=B7=E6=B1=82=E7=AD=89=E5=BE=85,token?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/tasks/batch_add_issues.rake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/tasks/batch_add_issues.rake b/lib/tasks/batch_add_issues.rake index d6b76dd0..198c76ef 100644 --- a/lib/tasks/batch_add_issues.rake +++ b/lib/tasks/batch_add_issues.rake @@ -144,7 +144,7 @@ namespace :batch_add_issues do if total_count > 100 total_page = (total_count / 100) + 1 total_page.times do |i| - sleep 3.seconds + sleep 1.seconds add_github_issues_to_project(project, i + 1 + count) end else @@ -160,7 +160,7 @@ namespace :batch_add_issues do # response = Net::HTTP.get_response(uri) http = Net::HTTP.new(uri.hostname, uri.port) http.use_ssl = true - response = http.send_request('GET', uri.path, nil, {'Content-Type' => 'application/json','authorization' => "Bearer #{ENV['token']}"}) + response = http.send_request('GET', uri, nil, {'Content-Type' => 'application/json','authorization' => "Bearer #{ENV['token']}"}) puts "gitee api response.code ===== #{response.code}" lists = JSON.parse(response.body) @@ -230,7 +230,7 @@ namespace :batch_add_issues do # comment_response = Net::HTTP.get_response(comment_uri) http = Net::HTTP.new(comment_uri.hostname, comment_uri.port) http.use_ssl = true - comment_response = http.send_request('GET', comment_uri.path, nil, {'Content-Type' => 'application/json','authorization' => "Bearer #{ENV['token']}"}) + comment_response = http.send_request('GET', comment_uri, nil, {'Content-Type' => 'application/json','authorization' => "Bearer #{ENV['token']}"}) comment_lists = JSON.parse(comment_response.body) comment_lists.each do |comment|