Closed hashworks closed 3 months ago
In my case this bug actually does affect functionality.
When I run this on a group with 34 repos:
gitlabber -t $GITLAB_READ_API_TOKEN -r -n path -a exclude -u https://internal.domain.com -i '/project/group**' -m http .
only the first 20 are downloaded.
Versions:
The problem is this https://python-gitlab.readthedocs.io/en/v4.1.1/api-usage.html#pagination
As a workaround I changed the three places where list() is called in gitlab_tree.py
to include get_all=True
as parameter in my local installation of gitlabber.
I took the liberty to create a pull request: https://github.com/ezbz/gitlabber/pull/119
If this was a repo clone issues, adding to say it is also happening with pip or pipx install:
gitlabber:8: 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 38 items. See https://python-gitlab.readthedocs.io/en/v4.2.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: /Users/christopher.langton/.local/pipx/venvs/gitlabber/lib/python3.12/site-packages/gitlab/client.py:956)
sys.exit(main())
Fixed Here: https://github.com/ezbz/gitlabber/pull/119
Describe the bug Running gitlabber produces a warning that doesn't affect the functionality.
To Reproduce
gitlabber -r .
Expected behavior No warnings appear.
Versions (please complete the following information):
Additional context Dep
python-gitlab
is on version 4.0.0.