Fix URLs in the `Link` header for `GET /projects/:id/repository/contributors` when no value is passed for `order_by` or `sort`
What does this MR do?
This fixes URLs in the Link header for GET /projects/:id/repository/contributors when no value is passed for order_by or sort.
Are there points in the code the reviewer needs to double check?
A more robust (but also with potential bigger/unknown consequences) would be to replace params with declared_params(include_missing: false) in API::Helpers::Pagination#pagination_links (I've quickly checked and that seems to work).
Why was this MR needed?
To fix a regression where the URLs generated in the Link header for GET /projects/:id/repository/contributors would be incorrect and return a order_by does not have a valid value, sort does not have a valid value error.
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Review
-
Has been reviewed by Backend
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together -
Internationalization required/considered -
End-to-end tests pass ( package-and-qamanual pipeline job)
What are the relevant issue numbers?
Closes #45363 (closed)
Edited by Rémy Coutable