Skip to content

"Configure Sourcegraph" button on code host opens an inexistant docs page when on Gerrit

Created by: marekweb

On Gerrit, the "Configure Sourcegraph" button takes you to a docs page which doesn't exist: https://docs.sourcegraph.com/integration/gerrit

This is because the ViewOnSourcegraphButton component builds the destination URL with https://docs.sourcegraph.com/integration/ + the code host name.

In this case, we're on code host gerrit and it automatically links to that docs page which doesn't actually exist yet.

Background context

The "Configure Sourcegraph" button appears in a code host integration in place of the "View on Sourcegraph" button when the user needs to connect their code host.

For other code hosts, we have docs at these URLs:

The reason why there is no existing page for Gerrit is because Gerrit is configured as an "other" git host: "Other Git repository hosts"

Possible solutions

  • Add the missing docs page. This page can be a stub or a redirect to "Other Git repository hosts". This is the simplest solution and doesn't require an update to the browser extension.
  • Change the "Configure Sourcegraph" button to have a different destination on Gerrit.