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

This commit is contained in:
xxq250 2023-12-15 16:48:33 +08:00
parent b7597c3fa7
commit de393148d9
1 changed files with 1 additions and 1 deletions

View File

@ -160,7 +160,7 @@ namespace :batch_add_issues do
# response = Net::HTTP.get_response(uri) # response = Net::HTTP.get_response(uri)
http = Net::HTTP.new(uri.hostname, uri.port) http = Net::HTTP.new(uri.hostname, uri.port)
http.use_ssl = true http.use_ssl = true
comment_response = http.send_request('GET', uri.path, nil, {'Content-Type' => 'application/json','authorization' => "Bearer #{ENV['token']}"}) response = http.send_request('GET', uri.path, nil, {'Content-Type' => 'application/json','authorization' => "Bearer #{ENV['token']}"})
puts "gitee api response.code ===== #{response.code}" puts "gitee api response.code ===== #{response.code}"
lists = JSON.parse(response.body) lists = JSON.parse(response.body)