class Pronto::Bitbucket

def pull

def pull
  @pull ||= if env_pull_id
              pull_requests.find { |pr| pr.id.to_i == env_pull_id }
            elsif @repo.branch
              pull_requests.find do |pr|
                pr.source['branch']['name'] == @repo.branch
              end
            end
end