Skip to content

Pass limit and offset when searching for commits

The following discussion from !29197 (merged) should be addressed:

  • @ali-gitlab started a discussion:

    find_commits_by_message accepts limit and offset, but they are not being passed at the moment. If limit is not passed, it defaults to 1000, so we might be able to speed this up by passing through page and per_page.

    Pagination still works correctly from the user's perspective, as long as they are within 1000 results. This is because we use Kaminari to paginate the results of this call (on line 23):

    Kaminari.paginate_array(commits).page(page).per(per_page)

    This can be a follow-up issue.

Edited by Alishan Ladhani