From 97c25a940b869b05f44512d049fe3352a27bb62f Mon Sep 17 00:00:00 2001 From: James Telfer <792299+jamestelfer@users.noreply.github.com> Date: Wed, 1 Nov 2023 18:04:16 +1100 Subject: [PATCH] fix: use equality for empty string comparison Co-authored-by: Johan Lindell --- internal/scm/github/github.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/scm/github/github.go b/internal/scm/github/github.go index 473f0da8..c947f87c 100755 --- a/internal/scm/github/github.go +++ b/internal/scm/github/github.go @@ -223,7 +223,7 @@ func (g *Github) getRepositories(ctx context.Context) ([]*github.Repository, err allRepos = append(allRepos, repos...) } - if len(g.CodeSearch) > 0 { + if g.CodeSearch) != "" { repos, err := g.getCodeSearchRepositories(ctx, g.CodeSearch) if err != nil { return nil, errors.Wrapf(err, "could not get code search results for '%s'", g.CodeSearch)