Something went wrong while fetching the environments for this merge request. Please try again.
Manually set total_count when paginating commits
What does this MR do?
Add a Link
header to the projects/:id/repository/commits
endpoint to follow the behavior of other paginated endpoints.
Are there points in the code the reviewer needs to double check?
I'm not certain the changes toRepository#commit_count
are appropriate, but I don't know any better way to do it. I'd love suggestions.I also don't know the appropriate place to write a test for this.Since the documentation assumes all endpoints are paginated, I'm not sure there's an appropriate place to document this.
Why was this MR needed?
Make the API experience more consistent by making pagination on this particular endpoint more obvious.
What are the relevant issue numbers?
Closes #1381 (closed) and #20207 (closed)
Screenshots (if relevant)
This is an API endpoint, so no screenshots are relevant
Does this MR meet the acceptance criteria?
-
CHANGELOG entry added -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the style guides -
Branch has no merge conflicts with master
(if you do - rebase it please) -
Squashed related commits together
Merge request reports
Activity
Please register or sign in to reply