Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Pagination prevent fetching more than 100 repositories #1

Open
GradedJestRisk opened this issue Jan 18, 2024 · 1 comment
Open

Comments

@GradedJestRisk
Copy link

Current perPage limit is 100 in Gitlab, and the script use 9999, thus fetching no more than 100 repositories.

https://docs.gitlab.com/ee/api/rest/index.html#pagination

per_page Number of items to list per page (default: 20, max: 100).

https://github.com/adroste/gitlab-clone-group/blob/main/gitlab-clone-group.py#L17

api_url = 'https://' + posixpath.join(args.gitlab_domain, 'api/v4/groups/', args.group_id, 'projects') + '?per_page=9999&page=1&include_subgroups=true'

@adroste
Copy link
Owner

adroste commented Jan 20, 2024

I personally never hit this limitation but I'm happy to accept a PR.
Should easily be doable by iterating over the pages ?per_page=100&page=n and concatenating the responses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants