bugfix: fix subgroup not appearing when authenticated

This commit is contained in:
Massaki Archambault 2020-12-30 21:35:28 -05:00
parent 87bc3976b1
commit 6770c68955
2 changed files with 6 additions and 4 deletions

View File

@ -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)

View File

@ -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)