Skip to content

Commit

Permalink
Use the configured include repositories in the GitHub filter (truffle…
Browse files Browse the repository at this point in the history
  • Loading branch information
mcastorina authored Oct 21, 2023
1 parent 3acc65b commit b8724e8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pkg/sources/github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,10 @@ func (s *Source) Init(aCtx context.Context, name string, jobID sources.JobID, so
}
s.conn = &conn

s.filteredRepoCache = s.newFilteredRepoCache(memory.New(), s.conn.GetRepositories(), s.conn.GetIgnoreRepos())
s.filteredRepoCache = s.newFilteredRepoCache(memory.New(),
append(s.conn.GetRepositories(), s.conn.GetIncludeRepos()...),
s.conn.GetIgnoreRepos(),
)
s.memberCache = make(map[string]struct{})

s.repoSizes = newRepoSize()
Expand Down Expand Up @@ -508,12 +511,12 @@ func (s *Source) enumerateUnauthenticated(ctx context.Context, apiEndpoint strin

for _, org := range s.orgsCache.Keys() {
if err := s.getReposByOrg(ctx, org); err != nil {
s.log.Error(err, "error fetching repos for org or user")
s.log.Error(err, "error fetching repos for org")
}

// We probably don't need to do this, since getting repos by org makes more sense?
if err := s.getReposByUser(ctx, org); err != nil {
s.log.Error(err, "error fetching repos for org or user")
s.log.Error(err, "error fetching repos for user")
}

if s.conn.ScanUsers {
Expand Down

0 comments on commit b8724e8

Please sign in to comment.