v3: eager load jobs for build history if asked for
This commit is contained in:
parent
2891dd640a
commit
3242189259
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user