Skip to content

Pagination of GitLab commit comments #894

@mfocko

Description

@mfocko

What happened? What is the problem?

Output from the tests ran via make check-in-container:

tests/integration/gitlab/test_generic_commands.py::GenericCommands::test_get_commit_comments
  /src/ogr/services/gitlab/project.py:314: UserWarning: Calling a `list()` method without specifying `get_all=True` or `iterator=True` will return a maximum of 20 items. Your query returned 20 of 23 items. See https://python-gitlab.readthedocs.io/en/v4.4.0/api-usage.html#pagination for more details. If this was done intentionally, then this warning can be supressed by adding the argument `get_all=False` to the `list()` call. (python-gitlab: /usr/lib/python3.12/site-packages/gitlab/client.py:956)
    for comment in commit_object.comments.list()

What did you expect to happen?

Promises to return a list, should be returning a list.

Example URL(s)

No response

Steps to reproduce

Run `make check-in-container`

Workaround

  • There is an existing workaround that can be used until this issue is fixed.

Participation

  • I am willing to submit a pull request for this issue. (Packit team is happy to help!)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions