Skip to content

Allow loading more commits in merge request

Phil Hughes requested to merge ph/16800/loadMoreMergeRequestCommits into master

What does this MR do and why?

Previously we would limit merge request commits to 100 for performance reasons. This keeps that limit but also adds a Load more button that allows the user to load another 100, this button will always appear until there are no more commits left.

This is an MVC, boring solution. We should re-write this part to be a Vue app as we are still just dumping HTML into the page.

Screenshots or screen recordings

Screen_Recording_2022-09-23_at_15.51.55

How to set up and validate locally

  • View a merge request with more than 100 commits
  • Click the commits tab

You can also change the number at https://gitlab.com/gitlab-org/gitlab/-/blob/2ecff3cb904e2ad27eb04045a0620cac52fd673c/app/models/merge_request_diff.rb#L13 to be lower so that it doesn't have to be 100 per page

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Closes #16800 (closed)

Edited by Phil Hughes

Merge request reports