microplane icon indicating copy to clipboard operation
microplane copied to clipboard

handle nested repos in init for GitLab

Open lucas-zmroczek-apl opened this issue 10 months ago • 1 comments

https://github.com/Clever/microplane/issues/93

Overview

This change allows for tested GitLab repos to be initialized. An example repos.txt file:

myorg/repo1
myorg/groupA/repo2
myorg/groupA/repo3
myorg/groupB/repo4

Before the fix, only myorg/repo1 would initialize. After the fix, all repos initialize.

Testing

Tested on GitLab, by running mp init with a repos file that contained the nested repos, as described in the example above.

# Before the fix
$ mp init --provider=gitlab --provider-url=https://gitlab.myorg.edu/ -f repos.txt
2024/03/29 16:53:01 unable determine repo from line, expected format '{org}/{repo}': myorg/groupA/repo2

# After the fix
$ ./src/microplane/bin/mp init --provider=gitlab --provider-url=https://gitlab.myorg.edu/ -f repos.txt
myorg/repo1
myorg/groupA/repo2
myorg/groupA/repo3
myorg/groupB/repo4

lucas-zmroczek-apl avatar Mar 29 '24 20:03 lucas-zmroczek-apl