Skip to content

The clone command with a specified group supports automatic pagination enabling cloning of more than 100 projects at once.

Description

The glab repo clone command supports manual pagination, but require the caller to interact with the groups/projects API elsewhere to retrieve the actual number of projects/pages.

This change adds a --paginate flag to glab repo clone which automatically pages all projects from the specified group, allowing the caller to clone more than 100 repositories at once.

The flag name --paginate was chosen to be consistent with glab api.

Related Issues

Resolves #1034 (closed)

How has this been tested?

This has been tested on a group with 183 repositories running the following command:

GITLAB_TOKEN=aabbcc glab repo clone -g <group> -p

Prior to the change exactly 100 repositories were cloned. After the change all 183 are cloned, the command is now:

GITLAB_TOKEN=aabbcc glab repo clone -g <group> -p --paginate

The development/testing has been done on OpenSUSE Tumbleweed against gitlab.com.

Screenshots (if appropriate):

Not appropriate.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation
  • Chore (Related to CI or Packaging to platforms)

Merge request reports