v3: eager load jobs for build history if asked for

This commit is contained in:
Konstantin Haase 2015-09-03 15:30:09 +02:00
parent 2891dd640a
commit 3242189259

View File

@ -15,6 +15,7 @@ module Travis::API::V3
list = list.includes(:commit).includes(branch: :last_build).includes(:repository)
list = list.includes(branch: { last_build: :commit }) if includes? 'build.commit'.freeze
list = list.includes(:jobs) if includes? 'build.jobs'.freeze or includes? 'job'.freeze
list
end
end