Merge branch 'mr-index-eager-load' into 'master'
Eager load head pipeline projects for MRs index See merge request !13877
This commit is contained in:
commit
e5c98c1ed9
2 changed files with 16 additions and 1 deletions
|
@ -15,7 +15,17 @@ module IssuableCollections
|
|||
end
|
||||
|
||||
def merge_requests_collection
|
||||
merge_requests_finder.execute.preload(:source_project, :target_project, :author, :assignee, :labels, :milestone, :head_pipeline, target_project: :namespace, merge_request_diff: :merge_request_diff_commits)
|
||||
merge_requests_finder.execute.preload(
|
||||
:source_project,
|
||||
:target_project,
|
||||
:author,
|
||||
:assignee,
|
||||
:labels,
|
||||
:milestone,
|
||||
head_pipeline: :project,
|
||||
target_project: :namespace,
|
||||
merge_request_diff: :merge_request_diff_commits
|
||||
)
|
||||
end
|
||||
|
||||
def issues_finder
|
||||
|
|
5
changelogs/unreleased/mr-index-eager-load.yml
Normal file
5
changelogs/unreleased/mr-index-eager-load.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Eager load head pipeline projects for MRs index
|
||||
merge_request:
|
||||
author:
|
||||
type: other
|
Loading…
Reference in a new issue