Remove double pagination for merge request diffs
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
What does this MR do and why?
Bug: list-merge-request-diffs API crashes with per_page > 30
When making a request to the list-merge-request-diffs endpoint with a per_page value greater than 30, the API responds with a 500 Internal Server Error.
Changes is in the MR:
- Remove double pagination for
list-merge-request-diffs - Change the max_per_page cap from 30 to kaminari's default 100
Issue: #427168 (closed)
How to set up and validate locally
Before:
- Call the endpoint
GET /projects/:id/merge_requests/:merge_request_iid/diffs?per_page=31(per_page > 30)
- It should raise 500 error
After:
- Call the endpoint
GET /projects/:id/merge_requests/:merge_request_iid/diffs?per_page=101(per_page > 100)
- It should not raise error and it should return max 100 diffs
Edited by Ivane Gkomarteli