Skip to content

[cloud][CLOUD-84] Create built-in organization search context

Administrator requested to merge CLOUD-84-milan into main

Created by: kopancek

Description

The PR adds a new type of auto defined search context - the organization one. It is only shown for users, that are members of organizations, that own at least 1 repository. The feature is only enabled on cloud (via the ENV flag check, that was already there for auto defined user context).

Related: https://sourcegraph.atlassian.net/browse/CLOUD-84

Screenshot

This is how it looks like if the user has one auto defined organization search context. Note, that there might be more, if the user is a member of multiple organizations with repositories. Screenshot 2021-10-25 at 16 54 34

Testing

To test locally, it is enough to have these prerequisites and the organization context should show up:

  1. The user should exist
  2. The user should be member of at least 1 organization
  3. Enable the organization code host connections and repositories feature for the organization (follow the guide specified in #26507)
  4. Add a code host connection and at least 1 repository to the organization
  5. Profit

Merge request reports

Loading