From 0481a5778ed33f91f7f96dd340990726de2f58dd Mon Sep 17 00:00:00 2001 From: sterni Date: Thu, 23 Jan 2025 22:40:19 +0100 Subject: [PATCH] feat(sterni/acme): add plumbing rule for r/XXXX short links This uses git show to display the revision same as the git commit rule. Change-Id: Ibf518adb60d15cac2126b6ab0c7e12c4b4637c25 Reviewed-on: https://cl.tvl.fyi/c/depot/+/13041 Reviewed-by: sterni Autosubmit: sterni Tested-by: BuildkiteCI --- users/sterni/acme/plumb/tvl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/users/sterni/acme/plumb/tvl b/users/sterni/acme/plumb/tvl index 0679917e7..9dba10722 100644 --- a/users/sterni/acme/plumb/tvl +++ b/users/sterni/acme/plumb/tvl @@ -1,7 +1,6 @@ # TODO(sterni): document TVL short links, # for now see //tools/cheddar, //web/atward, //tools/magrathea # and //ops/modules/monorepo-gerrit. -# TODO(sterni): r/([0-9]+) # TVL short links that go to the browser, e.g. cl/8413, b/187 @@ -17,6 +16,13 @@ data set https://b.tvl.fyi/issues/$1 plumb to web plumb start web $data +# TVL revision short links e.g. r/9000, r/3 + +type is text +data matches 'r/([0-9]+)' +data set refs/r/$1 +plumb start rc -c 'cd '$wdir'; cd `{git rev-parse --show-toplevel} && git show --pretty=fuller '$data' | plumb -i -d edit -a ''action=showdata filename=+git/'$data''' ' + # TVL target short links # TODO(sterni): implement subtargets