Add support for PR creation

This commit is contained in:
Adam Melkus
2019-11-15 13:21:07 +01:00
committed by GitHub
parent 1cf9c2206c
commit cae8d8022d

View File

@@ -13,10 +13,10 @@ def construct_PR_URL
remote = git_remote()
bbloc = remote.index('bitbucket.org')
if not bbloc
puts "only works for repositories with their origin remote on bitbucket.org"
exit 1
end
return "https://#{remote[bbloc..-5].sub(':','/')}/pull-requests/new?source=#{git_branch()}&t=1"
host = repo_url
else
host = remote[bbloc..-5].sub(':','/')
return "https://#{host}/pull-requests/new?source=#{git_branch()}&t=1"
end
if ARGV.length > 0