Skip to content
Snippets Groups Projects

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 to Repository#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?

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading