This is the port of https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/30574. Copied MR description:
What does this MR do?
This supersedes !23755 (merged) and closes #20642 (closed). 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:
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?
Screenshots
Description | Screenshot |
---|---|
Admin settings | ![]() |
User settings (only visible if enabled in the admin settings, and the help text changes based on the admin settings) | ![]() |
Demo
https://youtu.be/t85PosdwNag (17c9e0d1 on Nov 8)
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation created/updated or follow-up review issue created -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Performance and testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
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