From 6770c689551762c0e2477088a59034eee18631e5 Mon Sep 17 00:00:00 2001 From: Massaki Archambault Date: Wed, 30 Dec 2020 21:35:28 -0500 Subject: [PATCH] bugfix: fix subgroup not appearing when authenticated --- gitlab/group.go | 8 +++++--- gitlab/user.go | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/gitlab/group.go b/gitlab/group.go index f8b3a3c..25c913d 100644 --- a/gitlab/group.go +++ b/gitlab/group.go @@ -54,8 +54,10 @@ func (c *gitlabClient) FetchGroupContent(group *Group) (*GroupContent, error) { ListGroupsOpt := &gitlab.ListSubgroupsOptions{ ListOptions: gitlab.ListOptions{ Page: 1, - PerPage: 1000, - }} + PerPage: 100, + }, + AllAvailable: gitlab.Bool(true), + } for { gitlabGroups, response, err := c.client.Groups.ListSubgroups(group.ID, ListGroupsOpt) if err != nil { @@ -76,7 +78,7 @@ func (c *gitlabClient) FetchGroupContent(group *Group) (*GroupContent, error) { listProjectOpt := &gitlab.ListGroupProjectsOptions{ ListOptions: gitlab.ListOptions{ Page: 1, - PerPage: 1000, + PerPage: 100, }} for { gitlabProjects, response, err := c.client.Groups.ListGroupProjects(group.ID, listProjectOpt) diff --git a/gitlab/user.go b/gitlab/user.go index 206e766..84f2a94 100644 --- a/gitlab/user.go +++ b/gitlab/user.go @@ -62,7 +62,7 @@ func (c *gitlabClient) FetchUserContent(user *User) (*UserContent, error) { listProjectOpt := &gitlab.ListProjectsOptions{ ListOptions: gitlab.ListOptions{ Page: 1, - PerPage: 1000, + PerPage: 100, }} for { gitlabProjects, response, err := c.client.Projects.ListUserProjects(user.ID, listProjectOpt)