This commit is contained in:
6543 2021-05-05 11:00:22 +02:00
parent ebbcdeeb30
commit f0e5bafff9
Signed by: 6543
GPG Key ID: C99B82E40B027BAE
1 changed files with 17 additions and 7 deletions

24
main.go
View File

@ -61,13 +61,23 @@ func main() {
} }
fmt.Printf("Found \"%s\"\n", org.WebURL) fmt.Printf("Found \"%s\"\n", org.WebURL)


repoList, _, err := client.Groups.ListGroupProjects(org.ID, &gitlab.ListGroupProjectsOptions{ var repoList []*gitlab.Project
ListOptions: gitlab.ListOptions{}, var page = 1
Archived: optBool(false), for {
IncludeSubgroups: optBool(false), repos, _, err := client.Groups.ListGroupProjects(org.ID, &gitlab.ListGroupProjectsOptions{
}) ListOptions: gitlab.ListOptions{PerPage: 10, Page: page},
if err != nil { Archived: optBool(false),
error(5, "Could not obtain repo list: %v\n", err) IncludeSubgroups: optBool(false),
})
if err != nil {
error(5, "Could not obtain repo list: %v\n", err)
}

repoList = append(repoList, repos...)

if len(repoList) < 10 {
break
}
} }


for i := range repoList { for i := range repoList {