From 2728e514d257305eb589f1d9472791b92a772bc4 Mon Sep 17 00:00:00 2001 From: ahrav Date: Fri, 8 Dec 2023 14:51:24 -0800 Subject: [PATCH] move logic to main Chunks method (#2194) --- pkg/sources/gitlab/gitlab.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/sources/gitlab/gitlab.go b/pkg/sources/gitlab/gitlab.go index 54893cc0bb10..7feee6af9394 100644 --- a/pkg/sources/gitlab/gitlab.go +++ b/pkg/sources/gitlab/gitlab.go @@ -174,6 +174,7 @@ func (s *Source) Chunks(ctx context.Context, chunksChan chan *sources.Chunk, _ . } s.repos = repos + gitlabReposEnumerated.WithLabelValues(s.name).Set(float64(len(repos))) // We must sort the repos so we can resume later if necessary. slices.Sort(s.repos) @@ -412,7 +413,6 @@ func (s *Source) getReposFromGitlab(ctx context.Context, apiClient *gitlab.Clien return nil, errors.Errorf("unable to discover any repos"), true } - gitlabReposEnumerated.WithLabelValues(s.name).Set(float64(len(repos))) return repos, nil, false }