Eager load user, runner, pipeline and its creator
This commit is contained in:
parent
c9a1a1552a
commit
c9840842f1
1 changed files with 3 additions and 1 deletions
|
@ -35,7 +35,9 @@ module API
|
|||
get ':id/builds' do
|
||||
builds = user_project.builds.order('id DESC')
|
||||
builds = filter_builds(builds, params[:scope])
|
||||
present paginate(builds.includes(:job_artifacts_archive)), with: ::API::V3::Entities::Build
|
||||
|
||||
builds = builds.includes(:user, :job_artifacts_archive, :runner, pipeline: :project)
|
||||
present paginate(builds), with: ::API::V3::Entities::Build
|
||||
end
|
||||
|
||||
desc 'Get builds for a specific commit of a project' do
|
||||
|
|
Loading…
Reference in a new issue