Skip to content

Remove double pagination for merge request diffs

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:

  1. Remove double pagination for list-merge-request-diffs
  2. Change the max_per_page cap from 30 to kaminari's default 100

Issue: #427168 (closed)

How to set up and validate locally

Before:

  1. Call the endpoint GET /projects/:id/merge_requests/:merge_request_iid/diffs?per_page=31 (per_page > 30)
  1. It should raise 500 error

After:

  1. Call the endpoint GET /projects/:id/merge_requests/:merge_request_iid/diffs?per_page=101 (per_page > 100)
  1. It should not raise error and it should return max 100 diffs
Edited by Ivane Gkomarteli

Merge request reports

Loading