From cf2bbeb92757a398a36f778a464a57504bad0874 Mon Sep 17 00:00:00 2001 From: Adam Melkus Date: Fri, 15 Nov 2019 13:21:53 +0100 Subject: [PATCH] Update git-bb-list-pull-requests --- bin/git-bb-list-pull-requests | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/git-bb-list-pull-requests b/bin/git-bb-list-pull-requests index eed45f9..a071295 100755 --- a/bin/git-bb-list-pull-requests +++ b/bin/git-bb-list-pull-requests @@ -12,11 +12,12 @@ require_relative 'bbhelpers' def construct_PR_list_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 + if not bbloc + host = repo_url + else + host = remote[bbloc..-5].sub(':','/') end - return "https://#{remote[bbloc..-5].sub(':','/')}/pull-requests/" + return "https://#{host}/pull-requests/" end if ARGV.length > 0