Integrate with Phabricator

If you mirror your source repositories on Phabricator, Sourcegraph can provide users with links to various Phabricator pages.

The phabricator configuration option takes in an array of Phabricator configurations. A Phabricator configuration consists of the following fields:

  • url field that maps to the url of the Phabricator host
  • token an optional Conduit API token, which you may generate from the Phabricator web interface. The token is used to fetch the list of repos available on the Phabricator installation
  • repos if your Phabricator installation mirrors repositories from a different origin than Sourcegraph, you must specify a list of repository paths (as displayed on Sourcegraph) and their corresponding Phabricator callsigns. For example: [{ path: '', callsign: 'FOO'}]. Note that the callsign is case sensitive.

At least one of token and repos should be provided.

For example:

  // ...
  "phabricator": [
      "url": "",
      "token": "api-abcdefghijklmnop",
      "repos": [{ "path": "", "callsign": "MUX" }]
  // ...


If your outbound links to Phabricator are not present or not working, verify your Sourcegraph repository path matches the "normalized" URI output by Phabricator's conduit API.

For example, if you have a repository on Sourcegraph whose URL is then you should see a URI returned from whose normalized field is path/to/repo. Check this by navigating to $PHABRICATOR_URL/conduit/method/ and use the "Call Method" form with attachments field set to { "uris": true } and constraints field set to { "callsigns": ["$CALLSIGN_FOR_REPO_ON_SOURCEGRAPH"]}. In the generated output, verify that the first URI has a normalized path equal to path/to/repo.