Merge pull request #18242 from Homebrew/x-access-token

This commit is contained in:
Mike McQuaid 2024-09-04 08:43:47 +01:00 committed by GitHub
commit 628362f41c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -680,7 +680,7 @@ module GitHub
private_class_method def self.add_auth_token_to_url!(url)
if API.credentials_type == :env_token
url.sub!(%r{^https://github\.com/}, "https://#{API.credentials}@github.com/")
url.sub!(%r{^https://github\.com/}, "https://x-access-token:#{API.credentials}@github.com/")
end
url
end