Add preloading to MergeRequest#committers

What does this MR do and why?

Part of a process to begin preloading merge request commit metadata to avoid possible N+1 queries. This will consist of 5 MRs total, described in the table below.

This MR uses the preload_commits_metadata method added in Add preload option to MergeRequest#recent_commi... (!204107 - merged) to also add preloading to the committers method.

Order MR/status Description
Part 1 !203465 (merged) Adding scope to preload the latest diff commit
Part 2a !204107 (merged) Add preloading to MergeRequest#recent_commits
Part 2b 📍 !204128 (merged) Add preloading to MergeRequest#committers (relies on !204107 (merged))
Part 3 !204132 (merged) Add preloading to MergeRequestDiff#commit_shas
Part 4 !204123 (merged) Add Banzai find_commit_by_sha preloading

References

https://gitlab.com/gitlab-org/gitlab/-/issues/527235

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Gary Holtz

Merge request reports

Loading