about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2020-06-20T03·36+0100
committertazjin <mail@tazj.in>2020-06-20T17·29+0000
commit3b05be2fd0c0035977dbac731c26651b9ff3e373 (patch)
treea540bfe9c341ace3186bcc823164efeb5e80df56
parentd18faddba3281d543c6e552d514513bd6256032f (diff)
feat(monorepo-gerrit): Use Sourcegraph as the gitweb for Gerrit r/1047
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 <lukegb@tvl.fyi>
-rw-r--r--ops/nixos/monorepo-gerrit.nix20
1 files 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