Merge pull request #7299 from EricFromCanada/bump-formula-pr-envconfig

bump-formula-pr: use Homebrew::EnvConfig
This commit is contained in:
Mike McQuaid 2020-04-07 16:26:36 +01:00 committed by GitHub
commit e5995ef4f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -427,7 +427,9 @@ module Homebrew
response.fetch("ssh_url") response.fetch("ssh_url")
else else
url = response.fetch("clone_url") 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 url
end end
username = response.fetch("owner").fetch("login") username = response.fetch("owner").fetch("login")