Update Library/Homebrew/utils/github/api.rb
Co-authored-by: Rylan Polster <rslpolster@gmail.com>
This commit is contained in:
parent
ed4f840a67
commit
7beb1f227c
@ -48,7 +48,7 @@ module GitHub
|
|||||||
class RateLimitExceededError < Error
|
class RateLimitExceededError < Error
|
||||||
def initialize(reset, github_message)
|
def initialize(reset, github_message)
|
||||||
@github_message = github_message
|
@github_message = github_message
|
||||||
new_pat_message = API.credentials ? "" : ", or:\n#{CREATE_GITHUB_PAT_MESSAGE}"
|
new_pat_message = ", or:\n#{CREATE_GITHUB_PAT_MESSAGE}" if API.credentials.blank?
|
||||||
super <<~EOS
|
super <<~EOS
|
||||||
GitHub API Error: #{github_message}
|
GitHub API Error: #{github_message}
|
||||||
Try again in #{pretty_ratelimit_reset(reset)}#{new_pat_message}
|
Try again in #{pretty_ratelimit_reset(reset)}#{new_pat_message}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user