From 962c47fba209f34cbe8130202c675082bbf7847d Mon Sep 17 00:00:00 2001 From: Joe Block Date: Mon, 11 Apr 2016 16:05:44 -0700 Subject: [PATCH] Fix error in url by replacing : with / --- bin/git-bb-create-pull-request | 2 +- bin/git-bb-list-pull-requests | 2 +- bin/git-bb-open | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/git-bb-create-pull-request b/bin/git-bb-create-pull-request index 3e2eace..a4c07f5 100755 --- a/bin/git-bb-create-pull-request +++ b/bin/git-bb-create-pull-request @@ -22,7 +22,7 @@ def construct_PR_URL puts "only works for repositories with their origin remote on bitbucket.org" exit 1 end - return "https://#{remote[bbloc..-5]}/pull-requests/new?source=#{git_branch()}&t=1" + return "https://#{remote[bbloc..-5].sub(':','/')}/pull-requests/new?source=#{git_branch()}&t=1" end if ARGV.length > 0 diff --git a/bin/git-bb-list-pull-requests b/bin/git-bb-list-pull-requests index 06a12d4..dbf037a 100755 --- a/bin/git-bb-list-pull-requests +++ b/bin/git-bb-list-pull-requests @@ -22,7 +22,7 @@ def construct_PR_list_URL puts "Only works for repositories with their origin remote on bitbucket.org" exit 1 end - return "https://#{remote[bbloc..-5]}/pull-requests/" + return "https://#{remote[bbloc..-5].sub(':','/')}/pull-requests/" end if ARGV.length > 0 diff --git a/bin/git-bb-open b/bin/git-bb-open index 9e8dd1c..962a51b 100755 --- a/bin/git-bb-open +++ b/bin/git-bb-open @@ -22,7 +22,7 @@ def constructURL puts "git-bb-open only works for repositories with their origin remote on bitbucket.org" exit 1 end - url_prefix="https://#{remote[bbloc..-5]}/src/#{git_commit}" + url_prefix="https://#{remote[bbloc..-5].sub(':','/')}/src/#{git_commit}" root = Pathname.new(git_root()) pwd = Pathname.new(Dir.pwd()) if ARGV.length == 1