Skip to content

Commit

Permalink
🧹 more places where gitlab discovery returns the same asset (#3388)
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Milchev <[email protected]>
  • Loading branch information
imilchev authored Feb 21, 2024
1 parent 8a22383 commit f0ed3a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions providers/gitlab/provider/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func (s *Service) discoverGroups(root *inventory.Asset, conn *connection.GitLabC
subgroups, err := connection.DiscoverSubAndDescendantGroupsForGroup(conn, group.Path)
if err != nil {
log.Error().Err(err).Msg("unable to discover sub groups")
return []*inventory.Asset{root}, []*gitlab.Group{group}, err
return []*inventory.Asset{}, []*gitlab.Group{group}, err
}
groups = append(groups, subgroups...)
assets = append(assets, s.convertGitlabGroupsToAssetGroups(subgroups, conn, group.Path)...)
Expand Down Expand Up @@ -131,7 +131,7 @@ func (s *Service) discoverGroups(root *inventory.Asset, conn *connection.GitLabC
subgroups, err := connection.DiscoverSubAndDescendantGroupsForGroup(conn, group.Path)
if err != nil {
log.Error().Err(err).Msg("unable to discover sub groups")
return []*inventory.Asset{root}, []*gitlab.Group{group}, err
return []*inventory.Asset{}, []*gitlab.Group{group}, err
}
groups = append(groups, subgroups...)
assets = append(assets, s.convertGitlabGroupsToAssetGroups(subgroups, conn, group.Path)...)
Expand Down

0 comments on commit f0ed3a0

Please sign in to comment.