lib/pivotal-integration/util/git.rb in pivotal-integration-1.6.0.3 vs lib/pivotal-integration/util/git.rb in pivotal-integration-1.6.0.4

- old
+ new

@@ -173,20 +173,20 @@ def self.create_pull_request(story, to_branch = nil) case get_config_with_default('pivotal.pull-request-editor', :web).to_sym when :web # Open the PR editor in a web browser - repo = get_config('remote.origin.url')[/(?<=git@github.com:)[a-z0-9_-]+\/[a-z0-9_-]+/] + repo = get_config('remote.upstream.url')[/(?<=git@github.com:)[a-z0-9_-]+\/[a-z0-9_-]+/] title = CGI::escape("[##{story.id}] #{story.name}") + origin = get_config('remote.origin.url')[/(?<=git@github.com:)[a-z0-9_-]+/] url = "https://github.com/#{repo}/compare/" if to_branch - upstream = get_config('remote.upstream.url')[/(?<=git@github.com:)[a-z0-9_-]+/] - url << "#{upstream}:#{to_branch}..." + url << "#{to_branch}..." end - url << "#{branch_name}?expand=1&pull_request[title]=#{title}" + url << "#{origin}:#{branch_name}?expand=1&pull_request[title]=#{title}" Launchy.open url else print 'Checking for hub installation... ' if PivotalIntegration::Util::Shell.exec('which hub', false).empty?