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

handle nested repos in init for GitLab #251

Merged
merged 7 commits into from
Oct 30, 2024
3 changes: 2 additions & 1 deletion initialize/initialize.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ func reposFromFile(p *lib.Provider, file string) ([]lib.Repo, error) {
// in case file ends with newline, ignore it
continue
}
parts := strings.Split(item, "/")
// GitLab may have nested directories
parts := strings.SplitN(item, "/", 2)
if len(parts) != 2 {
return []lib.Repo{}, fmt.Errorf("unable determine repo from line, expected format '{org}/{repo}': %s", item)
}
Expand Down