From f0ed3a09dd5fc89e6d2784f042b3450889b1e189 Mon Sep 17 00:00:00 2001 From: Ivan Milchev Date: Wed, 21 Feb 2024 14:37:07 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20more=20places=20where=20gitlab?= =?UTF-8?q?=20discovery=20returns=20the=20same=20asset=20(#3388)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ivan Milchev --- providers/gitlab/provider/discovery.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/providers/gitlab/provider/discovery.go b/providers/gitlab/provider/discovery.go index 640e401afa..f6df918371 100644 --- a/providers/gitlab/provider/discovery.go +++ b/providers/gitlab/provider/discovery.go @@ -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)...) @@ -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)...)