From cf3378e609c858685595b048fb904de4b58f4af5 Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Fri, 17 May 2024 15:23:50 -0400 Subject: [PATCH] #7 more logs --- lib/octo.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/octo.rb b/lib/octo.rb index 1ca50b4c..3a840cf9 100644 --- a/lib/octo.rb +++ b/lib/octo.rb @@ -30,12 +30,14 @@ def octo $global[:octo] ||= begin if $options.testing.nil? o = Octokit::Client.new - unless $options.github_token.nil? + if $options.github_token.nil? + $loog.warn('Accessing GitHub API without a token!') + else token = $options.github_token o = Octokit::Client.new(access_token: token) - $loog.info("Accessing GitHub with a token (#{token.length} chars)") + $loog.info("Accessing GitHub API with a token (#{token.length} chars)") end - o = Obk.new(o, pause: 500) + o = Obk.new(o, pause: 1000) else o = FakeOctokit.new end