Skip to content

Listing all files from repository fails because of pagination #314

Closed

Description

@tomascapek

I was trying to list all files on given branch in given repository using gitlab.v4.objects.Project.repository_tree(path, branch_name, all = True), but result was truncated, because of Gitlab pagination.

From your docs, I thought, that all = True should work on any type of "request". I looked into the code and find out, that this isn't implemented.

Should this be implemented in your package or am I approaching this task in a wrong way?

Activity

  1. gpocentek commented on Sep 19, 2017

    @gpocentek
    Contributor

    Indeed all = True is not supported on Project.repository_tree(). It needs to be explicitly added, and a few other methods have the same problem.

    You can still use the pagination options for now (page and per_page arguments).

    Thanks for reporting this issue.

  2. tomascapek commented on Sep 19, 2017

    @tomascapek
    Author

    Thanks for quick reply. I used those options

  3. gpocentek commented on Sep 21, 2017

    @gpocentek
    Contributor

    all = True should work as expected now.

  4. tomascapek commented on Sep 22, 2017

    @tomascapek
    Author

    Thanks for your great work!

  5. locked as resolved and limited conversation to collaborators on Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions