Skip to content

add default_repos table and use it if it is nonempty and the repo: field is missing

Warren Gifford requested to merge 4992-default-repos into master

Created by: ijt

This PR makes progress on https://github.com/sourcegraph/sourcegraph/issues/4992#issuecomment-517559931. The goal is to make queries without a repo: field work on sourcegraph.com.

Before: Screen Shot 2019-08-02 at 10 24 08

After: Screen Shot 2019-08-02 at 10 24 28

Test plan: Unit test for defaultRepos.List. Manual testing:

  1. In psql add a row to default_repos for some repo in the repo table.
  2. Run a query with something to be found in that repo, but without a repo: field.
  3. The search results should only show matches for that repo and no others.
  4. delete from default_repos; and check that search results appear for other repos as well.

Merge request reports

Loading