bump-formula-pr: use Homebrew::EnvConfig

This commit is contained in:
EricFromCanada 2020-04-07 09:56:46 -04:00
parent bd082011c2
commit 634e30994e

View File

@ -427,7 +427,9 @@ module Homebrew
response.fetch("ssh_url")
else
url = response.fetch("clone_url")
url.gsub!(%r{^https://github\.com/}, "https://#{GitHub.env_token}@github.com/") if GitHub.env_token
if (api_token = Homebrew::EnvConfig.github_api_token)
url.gsub!(%r{^https://github\.com/}, "https://#{api_token}@github.com/")
end
url
end
username = response.fetch("owner").fetch("login")