about summary refs log tree commit diff
path: root/ops/nixos/monorepo-gerrit.nix
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-04-10T15·25+0200
committertazjin <mail@tazj.in>2021-04-10T15·28+0000
commitf205d8ee73a6b1288b1cf4942704d912543cdf2b (patch)
treebffc16c6e982214f20fa8a32006d2dc33a1a61fd /ops/nixos/monorepo-gerrit.nix
parente6d1e68f4add807b94173788b9e53da98b4e255b (diff)
feat(gerrit): Auto link 'cl/123'-style shortlinks r/2467
Same as linking to bugs (e.g. b/108).

Change-Id: I447020bc07059c98c53322d745f961d8d471d9a4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2919
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Diffstat (limited to 'ops/nixos/monorepo-gerrit.nix')
-rw-r--r--ops/nixos/monorepo-gerrit.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/ops/nixos/monorepo-gerrit.nix b/ops/nixos/monorepo-gerrit.nix
index 61d8b71a5baa..eaea386ecd11 100644
--- a/ops/nixos/monorepo-gerrit.nix
+++ b/ops/nixos/monorepo-gerrit.nix
@@ -74,6 +74,12 @@ in {
         html = "<a href=\"https://b.tvl.fyi/issues/$1\">b/$1</a>";
       };
 
+      # Auto-link other CLs
+      commentlink.gerrit = {
+        match = "cl/(\\\\d+)";
+        html = "<a href=\"https://cl.tvl.fyi/$1\">cl/$1</a>";
+      };
+
       # Configures integration with CAS, which then integrates with a variety
       # of backends.
       auth.type = "OAUTH";