From cae8d8022d0d2d4380f5ac6b48e73f45f15d13dc Mon Sep 17 00:00:00 2001 From: Adam Melkus Date: Fri, 15 Nov 2019 13:21:07 +0100 Subject: [PATCH] Add support for PR creation --- bin/git-bb-create-pull-request | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/git-bb-create-pull-request b/bin/git-bb-create-pull-request index 8ab3990..01945f6 100755 --- a/bin/git-bb-create-pull-request +++ b/bin/git-bb-create-pull-request @@ -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