From e9b2b0d51cd5bd514f38dc1cc389bd8ae5a5f97e Mon Sep 17 00:00:00 2001 From: sterni Date: Mon, 25 Nov 2024 12:29:09 +0100 Subject: feat(ops/monorepo-gerrit): link r/ shortlinks to revisions I've decided to use the commit view instead of the log view (which cgit uses) for now. It really depends on how you use it in commit messages: To refer to a depot state or to a specific change (independently of what CL gerrit assigned). I'm happy to change it to use the log view. Change-Id: I472b511fa1322f91304f6543473b51f9c5f21ca2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12837 Autosubmit: sterni Reviewed-by: tazjin Tested-by: BuildkiteCI --- ops/modules/monorepo-gerrit.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ops/modules/monorepo-gerrit.nix b/ops/modules/monorepo-gerrit.nix index b335fe61d5bb..e9d48a6e35bc 100644 --- a/ops/modules/monorepo-gerrit.nix +++ b/ops/modules/monorepo-gerrit.nix @@ -97,6 +97,12 @@ in link = "https://cl.tvl.fyi/$1"; }; + # Auto-link links to monotonically increasing revisions/commits + commentlink.revision = { + match = "r/(\\d+)"; + link = "https://code.tvl.fyi/commit/?h=refs/r/$1"; + }; + # Configures integration with Keycloak, which then integrates with a # variety of backends. auth.type = "OAUTH"; -- cgit 1.4.1