Skip to content

frontend: Separate default repos scope

Administrator requested to merge core/deafult-repos-scope into main

Created by: ryanslade

Before, fetching default repos would list ALL default repos. These include anything in the default_repos table, user added repos (both public and private) as well as any repos added to the user_public_repos table.

This query was used both for sending the list of repos that Zoekt should index as well as the repos we include when performing a default indexed search.

Since it's used for search, private repos added by any user would appear in search results (although the contents would at least be hidden).

Now, we've split it into two:

  1. ListDefault which list all default repos as before.

  2. ListDefaultPublicAndUser which lists all public default repos and any private repos added by the current user.

1 will be used by when sending repos to Zoekt for indexing. 2 will be used when performing searches.

Closes: https://github.com/sourcegraph/sourcegraph/issues/20254

TODO:

  • Tests

Merge request reports

Loading