Dont ask to create PAT if one already exists

This commit is contained in:
Logicer 2021-07-19 10:28:11 +10:00
parent 5b7921ff68
commit 06f415e819

View File

@ -50,8 +50,7 @@ module GitHub
@github_message = github_message
super <<~EOS
GitHub API Error: #{github_message}
Try again in #{pretty_ratelimit_reset(reset)}, or:
#{CREATE_GITHUB_PAT_MESSAGE}
Try again in #{pretty_ratelimit_reset(reset)}#{!API.credentials ? ", or:\n" + CREATE_GITHUB_PAT_MESSAGE : ""}
EOS
end