From 87348dc17959eebbb33f2575fc98f271f1fbfdad Mon Sep 17 00:00:00 2001 From: Issy Long Date: Tue, 7 Feb 2023 02:05:46 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Bo Anderson --- Library/Homebrew/utils/github/api.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/utils/github/api.rb b/Library/Homebrew/utils/github/api.rb index c174c12314..610b8ba0a8 100644 --- a/Library/Homebrew/utils/github/api.rb +++ b/Library/Homebrew/utils/github/api.rb @@ -52,7 +52,7 @@ module GitHub class RateLimitExceededError < Error def initialize(reset, github_message) @github_message = github_message - new_pat_message = ", or:\n#{pat_blurb}" if API.credentials.blank? + new_pat_message = ", or:\n#{GitHub.pat_blurb}" if API.credentials.blank? super <<~EOS GitHub API Error: #{github_message} Try again in #{pretty_ratelimit_reset(reset)}#{new_pat_message} @@ -79,7 +79,7 @@ module GitHub The GitHub credentials in the macOS keychain may be invalid. Clear them with: printf "protocol=https\\nhost=github.com\\n" | git credential-osxkeychain erase - #{pat_blurb} + #{GitHub.pat_blurb} EOS end super message.freeze @@ -90,7 +90,7 @@ module GitHub class MissingAuthenticationError < Error def initialize message = +"No GitHub credentials found in macOS Keychain or environment.\n" - message << pat_blurb + message << GitHub.pat_blurb super message end end @@ -180,7 +180,7 @@ module GitHub Your #{what} credentials do not have sufficient scope! Scopes required: #{needed_scopes} Scopes present: #{credentials_scopes} - #{pat_blurb} + #{GitHub.pat_blurb} EOS end