Sourcegraph for GitLab

By Isaac Snow on October 1, 2018


You can now get code intelligence on GitLab with the Sourcegraph browser extension, just as 10,000s of developers get on GitHub now.

Sourcegraph for GitLab

To start using this:

  1. Install Sourcegraph for Chrome or Sourcegraph for Firefox
  2. Visit common/executor.go in gitlab-org/gitlab-runner on GitLab (or any other file in a public repository)
  3. Enable Sourcegraph for GitLab on Chrome by right clicking the Sourcegraph logo in your browser's toolbar and click "Enable Sourcegraph on this domain".
  4. Hover over any token in the file to see tooltips

To use this on your company's private code, run a Sourcegraph instance.

GitLab is the first of many more code hosts Sourcegraph will support in the open source Sourcegraph browser extension. Check out the code it took to add GitLab support: https://sourcegraph.com/github.com/sourcegraph/browser-extensions/-/blob/src/libs/gitlab/code_intelligence.ts

Implementation Notes

  • I want to give GitLab a shoutout for making a really clean DOM. We extend several products via the DOM and GitLab's is by far the cleanest. Thanks for minding your class names GitLabbers!