[devdocsgjs/main: 1043/1867] doc.fetch: read GITHUB_TOKEN also from ENV
- From: Andy Holmes <andyholmes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devdocsgjs/main: 1043/1867] doc.fetch: read GITHUB_TOKEN also from ENV
- Date: Fri, 19 Nov 2021 23:47:40 +0000 (UTC)
commit c25fbb4b3c8d61802fca38e175373ce26b491b09
Author: Simon Legner <Simon Legner gmail com>
Date: Fri Feb 7 20:23:56 2020 +0100
doc.fetch: read GITHUB_TOKEN also from ENV
lib/docs/core/doc.rb | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/lib/docs/core/doc.rb b/lib/docs/core/doc.rb
index a5268300..94611208 100644
--- a/lib/docs/core/doc.rb
+++ b/lib/docs/core/doc.rb
@@ -220,6 +220,8 @@ module Docs
if opts.key?(:github_token) and url.start_with?('https://api.github.com/')
headers['Authorization'] = "token #{opts[:github_token]}"
+ elsif ENV['GITHUB_TOKEN'] and url.start_with?('https://api.github.com/')
+ headers['Authorization'] = "token #{ENV['GITHUB_TOKEN']}"
end
opts[:logger].debug("Fetching #{url}")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]