feat: ability to clone repositories from a GitLab Group
This PR add the ability to clone all repositories in a GitLab group with glab repo clone -g <group>
as suggested by @solidnerd https://github.com/profclems/glab/issues/348#issue-755934232
Provides additional options (flags) to limit the type of repositories to clone in the group.
USAGE
glab repo clone <repo> [<dir>] [-- [<gitflags>...]] [flags]
FLAGS
-g, --group string Specify group to clone repositories from
-a, --archived Limit by archived status. Used with --group flag
-G, --include-subgroups Include projects in subgroups of this group. Default is true. Used with --group flag (default true)
-m, --mine Limit by projects in the group owned by the current authenticated user. Used with --group flag
-v, --visibility string Limit by visibility {public, internal, or private}. Used with --group flag
-I, --with-issues-enabled Limit by projects with issues feature enabled. Default is false. Used with --group flag
-M, --with-mr-enabled Limit by projects with issues feature enabled. Default is false. Used with --group flag
-S, --with-shared Include projects shared to this group. Default is false. Used with --group flag
How Has it Been Tested
Manually tests on everyonecancontribute
and glab-cli
groups, as well as provided some unit tests
Related Issue
Resolves #348 (closed)
TODO
- Users should be able to clone all owned repositories from GitLab with
glab
. (Needs a separate PR)