From 1a18688ac4a7e552733f2e906260fa2992772369 Mon Sep 17 00:00:00 2001 From: Konrad Strack Date: Fri, 23 Sep 2016 16:25:54 +0100 Subject: [PATCH] Fix Bitbucket pull request selection broken due to a different response schema --- lib/pronto/bitbucket.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/pronto/bitbucket.rb b/lib/pronto/bitbucket.rb index cef54d12..a40310c4 100644 --- a/lib/pronto/bitbucket.rb +++ b/lib/pronto/bitbucket.rb @@ -65,7 +65,9 @@ def pull @pull ||= if env_pull_id pull_requests.find { |pr| pr.id.to_i == env_pull_id.to_i } elsif @repo.branch - pull_requests.find { |pr| pr.branch['name'] == @repo.branch } + pull_requests.find do |pr| + pr.source['branch']['name'] == @repo.branch + end end end