Skip to content

Add Sourcegraph integration

Felix Becker requested to merge felixfbecker/gitlab-ce:sourcegraph into master

Moved to gitlab!16556 (merged)

What does this MR do?

This supersedes !23755 (closed) and closes #41925 (moved). It natively integrates Sourcegraph into Gitlab without the need to install the Sourcegraph browser extension, which directly brings all the features to GitLab that Sourcegraph extensions provide, like code intelligence (hover tooltips, go to definition, etc) or code coverage decorations:

Screen_Shot_2019-07-10_at_17.00.30

The UI uses the GitLab CSS so they fit into the GitLab design. Users can add write their own extensions against the Sourcegraph extension API. The Sourcegraph integration is fully open source: https://github.com/sourcegraph/sourcegraph/tree/master/browser

In its current form, this only works on gitlab.com, loading extensions from the extension marketplace on sourcegraph.com. For private instances, there would need to be a setting in the admin UI to set the URL of a private Sourcegraph instance. Could I get some guidance on where to add this UI and how to persist that setting and read it in the frontend JavaScript?

cc @phikai @deuley

Does this MR meet the acceptance criteria?

Conformity

Performance and testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Felix Becker

Merge request reports