mirror of
https://github.com/adusak/bitbucket-git-helpers.plugin.zsh.git
synced 2026-03-25 10:51:01 +01:00
Add support for PR creation
This commit is contained in:
@@ -13,10 +13,10 @@ def construct_PR_URL
|
|||||||
remote = git_remote()
|
remote = git_remote()
|
||||||
bbloc = remote.index('bitbucket.org')
|
bbloc = remote.index('bitbucket.org')
|
||||||
if not bbloc
|
if not bbloc
|
||||||
puts "only works for repositories with their origin remote on bitbucket.org"
|
host = repo_url
|
||||||
exit 1
|
else
|
||||||
end
|
host = remote[bbloc..-5].sub(':','/')
|
||||||
return "https://#{remote[bbloc..-5].sub(':','/')}/pull-requests/new?source=#{git_branch()}&t=1"
|
return "https://#{host}/pull-requests/new?source=#{git_branch()}&t=1"
|
||||||
end
|
end
|
||||||
|
|
||||||
if ARGV.length > 0
|
if ARGV.length > 0
|
||||||
|
|||||||
Reference in New Issue
Block a user