Skip to content

Commit

Permalink
fix: always include forks in repo search
Browse files Browse the repository at this point in the history
  • Loading branch information
jamestelfer committed Oct 25, 2023
1 parent a704080 commit 7da2928
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/scm/github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,11 @@ func (g *Github) getSearchRepositories(ctx context.Context, search string) ([]*g
i := 1
for {
rr, _, err := retry(ctx, func() ([]*github.Repository, *github.Response, error) {
rr, resp, err := g.ghClient.Search.Repositories(ctx, search, &github.SearchOptions{
// Include forks in the search: these are filtered if needed. We could
// filter in the search but this would not log that the fork had been
// skipped, which is different behaviour to the other types of retrieval.
query := "fork:true " + search
rr, resp, err := g.ghClient.Search.Repositories(ctx, query, &github.SearchOptions{
ListOptions: github.ListOptions{
Page: i,
PerPage: 100,
Expand Down

0 comments on commit 7da2928

Please sign in to comment.