v3: avoid fetching the same repo owner over and over again when rendering a repo list

This commit is contained in:
Konstantin Haase 2015-04-28 22:28:45 +02:00
parent 075e2d1c6c
commit 283092ff92

View File

@ -23,8 +23,9 @@ module Travis::API::V3
end
def include_owner?
return true if include? 'repository.owner'.freeze
return true if include.any? { |i| i.start_with? owner_type or i.start_with? 'owner'.freeze }
return false if included_owner?
return true if include? 'repository.owner'.freeze
return true if include.any? { |i| i.start_with? owner_type or i.start_with? 'owner'.freeze }
end
def included_owner?