Merge pull request #7092 from dawidd6/bump-push-with-token
bump-formula-pr: return remote url with token in it
This commit is contained in:
commit
10ba0d5a66
@ -420,7 +420,9 @@ module Homebrew
|
|||||||
remote_url = if system("git", "config", "--local", "--get-regexp", "remote\..*\.url", "git@github.com:.*")
|
remote_url = if system("git", "config", "--local", "--get-regexp", "remote\..*\.url", "git@github.com:.*")
|
||||||
response.fetch("ssh_url")
|
response.fetch("ssh_url")
|
||||||
else
|
else
|
||||||
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
|
||||||
|
url
|
||||||
end
|
end
|
||||||
username = response.fetch("owner").fetch("login")
|
username = response.fetch("owner").fetch("login")
|
||||||
[remote_url, username]
|
[remote_url, username]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user