utils/github: Use constant everywhere for "create a PAT" message
- This way if we ever change this messaging, we only have to do so once.
This commit is contained in:
parent
ccb6d5e834
commit
9394fe2b52
@ -49,9 +49,8 @@ module GitHub
|
|||||||
@github_message = github_message
|
@github_message = github_message
|
||||||
super <<~EOS
|
super <<~EOS
|
||||||
GitHub API Error: #{github_message}
|
GitHub API Error: #{github_message}
|
||||||
Try again in #{pretty_ratelimit_reset(reset)}, or create a personal access token:
|
Try again in #{pretty_ratelimit_reset(reset)}, or:
|
||||||
#{ALL_SCOPES_URL}
|
#{CREATE_GITHUB_PAT_MESSAGE}
|
||||||
#{Utils::Shell.set_variable_in_profile("HOMEBREW_GITHUB_API_TOKEN", "your_token_here")}
|
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -75,9 +74,7 @@ module GitHub
|
|||||||
The GitHub credentials in the macOS keychain may be invalid.
|
The GitHub credentials in the macOS keychain may be invalid.
|
||||||
Clear them with:
|
Clear them with:
|
||||||
printf "protocol=https\\nhost=github.com\\n" | git credential-osxkeychain erase
|
printf "protocol=https\\nhost=github.com\\n" | git credential-osxkeychain erase
|
||||||
Or create a personal access token:
|
#{CREATE_GITHUB_PAT_MESSAGE}
|
||||||
#{ALL_SCOPES_URL}
|
|
||||||
#{Utils::Shell.set_variable_in_profile("HOMEBREW_GITHUB_API_TOKEN", "your_token_here")}
|
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
super message.freeze
|
super message.freeze
|
||||||
@ -182,9 +179,7 @@ module GitHub
|
|||||||
Your #{what} credentials do not have sufficient scope!
|
Your #{what} credentials do not have sufficient scope!
|
||||||
Scopes required: #{needed_scopes}
|
Scopes required: #{needed_scopes}
|
||||||
Scopes present: #{credentials_scopes}
|
Scopes present: #{credentials_scopes}
|
||||||
Create a personal access token:
|
#{CREATE_GITHUB_PAT_MESSAGE}
|
||||||
#{ALL_SCOPES_URL}
|
|
||||||
#{Utils::Shell.set_variable_in_profile("HOMEBREW_GITHUB_API_TOKEN", "your_token_here")}
|
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user