Skip to content

Commit

Permalink
[chore] - remove deprecated types (#2168)
Browse files Browse the repository at this point in the history
* remove deprecated types

* missed one
  • Loading branch information
ahrav authored Dec 4, 2023
1 parent 08b58aa commit 996a11d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pkg/sources/gitlab/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ func (s *Source) getAllProjects(ctx context.Context, apiClient *gitlab.Client) (
)
listOpts := gitlab.ListOptions{PerPage: paginationLimit}

projectQueryOptions := &gitlab.ListProjectsOptions{OrderBy: gitlab.String(orderBy), ListOptions: listOpts}
projectQueryOptions := &gitlab.ListProjectsOptions{OrderBy: gitlab.Ptr(orderBy), ListOptions: listOpts}
for {
userProjects, res, err := apiClient.Projects.ListUserProjects(user.ID, projectQueryOptions)
if err != nil {
Expand All @@ -335,13 +335,13 @@ func (s *Source) getAllProjects(ctx context.Context, apiClient *gitlab.Client) (

listGroupsOptions := gitlab.ListGroupsOptions{
ListOptions: listOpts,
AllAvailable: gitlab.Bool(false), // This actually grabs public groups on public GitLab if set to true.
TopLevelOnly: gitlab.Bool(false),
Owned: gitlab.Bool(false),
AllAvailable: gitlab.Ptr(false), // This actually grabs public groups on public GitLab if set to true.
TopLevelOnly: gitlab.Ptr(false),
Owned: gitlab.Ptr(false),
}
const cloudBaseURL = "https://gitlab.com/"
if s.url != cloudBaseURL {
listGroupsOptions.AllAvailable = gitlab.Bool(true)
listGroupsOptions.AllAvailable = gitlab.Ptr(true)
}

var groups []*gitlab.Group
Expand All @@ -360,8 +360,8 @@ func (s *Source) getAllProjects(ctx context.Context, apiClient *gitlab.Client) (
for _, group := range groups {
listGroupProjectOptions := &gitlab.ListGroupProjectsOptions{
ListOptions: listOpts,
OrderBy: gitlab.String(orderBy),
IncludeSubGroups: gitlab.Bool(true),
OrderBy: gitlab.Ptr(orderBy),
IncludeSubGroups: gitlab.Ptr(true),
}
for {
grpPrjs, res, err := apiClient.Groups.ListGroupProjects(group.ID, listGroupProjectOptions)
Expand Down

0 comments on commit 996a11d

Please sign in to comment.