Skip to content

codeintel: Apply policies to groups of repositories

Warren Gifford requested to merge ef/25788 into main

Created by: efritz

Fixes #25788 (closed). This PR updates configuration policies so that they are now applicable to groups of repositories instead of the previous options: applying to an single explicit repository, or applying to all repositories.

After this PR we should now be able to configure index and data retention policies for things like:

  • code hosts (github.com/*)
  • repos belonging to a particular org (github.com/sourcegraph/*)
  • forks of a repository (*etcd)
  • everything in the instance (*)

This PR contains a migration to add a repository pattern field to each configuration policy record, which is mutually exclusive with a supplied repository identifier. Periodically, we refresh the set of repositories that match one of these given patterns and materialize the result in a new many-to-many lookup table.

We also updated the UI so that repository patterns can be added from the SPA.

After this PR is merged we can remove the use of search contexts for the way to specify candidate repos for auto-indexing.

Merge request reports

Loading