Put API.credentials bit into separate variable
This commit is contained in:
parent
71b61d28d1
commit
0c6f5ab233
@ -48,9 +48,10 @@ 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}"
|
||||||
super <<~EOS
|
super <<~EOS
|
||||||
GitHub API Error: #{github_message}
|
GitHub API Error: #{github_message}
|
||||||
Try again in #{pretty_ratelimit_reset(reset)}#{API.credentials ? "" : ", or:\n#{CREATE_GITHUB_PAT_MESSAGE}"}
|
Try again in #{pretty_ratelimit_reset(reset)}#{new_PAT_message}
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user