Skip to content

User <-> Public Repo mapping table

Created by: arussellsaw

In #16326 (closed) we need a way for users to specify that they'd like certain public repos to be synced, even if they have no code hosts configured, and we also want these repos to be added to the user's default search context. In order to do this we need to introduce a non-owner relationship between user and repo, which will let us know that a user is interested in a repo, and also sync & index it if it's not already, but doesn't allow them to manage the repository itself.

To do this we want to introduce a new table that maps between public repositories and user IDs, generally these repositories will be under the default public code host for sourcegraph.com, but there's also a chance that they might be owned by a different sourcegraph user's code host.