We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 674e16c commit 56d957cCopy full SHA for 56d957c
.github/workflows/test.yml
@@ -63,5 +63,7 @@ jobs:
63
run: |
64
bundle install
65
- name: Test
66
+ env:
67
+ GH_TOKEN: ${{ github.token }}
68
69
bundle exec rake
lib/datasets/downloader.rb
@@ -168,6 +168,12 @@ def download(output_path, &block)
168
else
169
request = Net::HTTP::Get.new(path, headers)
170
end
171
+ if url.scheme == "https" and url.host == "api.github.com"
172
+ gh_token = ENV["GH_TOKEN"]
173
+ if gh_token
174
+ headers = headers.merge("Authorization" => "Bearer #{gh_token}")
175
+ end
176
177
http.request(request) do |response|
178
case response
179
when Net::HTTPSuccess, Net::HTTPPartialContent
0 commit comments