From 3b05be2fd0c0035977dbac731c26651b9ff3e373 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sat, 20 Jun 2020 04:36:56 +0100 Subject: feat(monorepo-gerrit): Use Sourcegraph as the gitweb for Gerrit This points commit/file/etc. links from Gerrit to Sourcegraph instead of cgit. There's a minor problem with this: Some, but not all unsubmitted CLs are missing in Sourcegraph for unclear reasons so they lead to 404s. That problem is unrelated to this change and something we need to investigate separately. Change-Id: I9b0c1eca8781dc96984ba09b4a71960eb43583bd Reviewed-on: https://cl.tvl.fyi/c/depot/+/541 Reviewed-by: lukegb --- ops/nixos/monorepo-gerrit.nix | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ops/nixos/monorepo-gerrit.nix b/ops/nixos/monorepo-gerrit.nix index 003088fde6..185ff92b4f 100644 --- a/ops/nixos/monorepo-gerrit.nix +++ b/ops/nixos/monorepo-gerrit.nix @@ -43,18 +43,18 @@ in { "pull" ]; - # Configure for cgit. + # Configure for Sourcegraph. gitweb = { type = "custom"; - url = "https://code.tvl.fyi"; - project = "/"; - revision = "/commit/?id=\${commit}"; - branch = "/log/?h=\${branch}"; - tag = "/tag/?h=\${tag}"; - roottree = "/tree/?h=\${commit}"; - file = "/tree/\${file}?h=\${commit}"; - filehistory = "/log/\${file}?h=\${branch}"; - linkname = "cgit"; + url = "https://cs.tvl.fyi"; + linkname = "Sourcegraph"; + project = "/depot"; + revision = "/depot/-/commit/\${commit}"; + branch = "/depot@\${branch}"; + tag = "/depot@\${tag}"; + roottree = "/depot@\${commit}"; + file = "/depot@\${commit}/-/blob/\${file}"; + filehistory = "/depot@\${commit}/-/blob/\${file}#&tab=history"; }; # Configures integration with the locally running OpenLDAP -- cgit 1.4.1