Skip to content

Commit 09fe3a4

Browse files
committed
Handle redirects in github api
1 parent 9a6bc72 commit 09fe3a4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/github_api.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ def self.request_raw(uri, github_token, params = nil, headers = {})
6161
break
6262
end
6363

64+
return request_raw(uri, github_token, params, headers) if response == Net::HTTPRedirection
65+
6466
unless response.code.to_i == 200
6567
raise "Request failed with #{response.code}: #{response.read_body}"
6668
end

0 commit comments

Comments
 (0)