Skip to content

Commit

Permalink
move logic to main Chunks method (#2194)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahrav authored Dec 8, 2023
1 parent 2a78139 commit 2728e51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/sources/gitlab/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit 2728e51

Please sign in to comment.