about summary refs log tree commit diff
path: root/ops/gerrit-tvl/HttpModule.java
diff options
context:
space:
mode:
authorLuke Granger-Brown <git@lukegb.com>2021-04-06T16·47+0100
committerlukegb <lukegb@tvl.fyi>2021-04-06T18·43+0000
commit21765a140705dbd6c89c77ffb974c2143a953f5c (patch)
tree3daaecee7af9fb0c350ffffe8673c47cda8c9f15 /ops/gerrit-tvl/HttpModule.java
parent79aa14278832be17c41ea179b92047454c511789 (diff)
feat(ops/gerrit-tvl): init TVL Gerrit plugin r/2452
This is just going to be a grab bag of things which do TVL-specific
things to Gerrit, whether that be exposing new Prolog predicates or, as
I intend to do as the first thing, expose Buildkite builds as checks.

Change-Id: Iaeab987a1fdbd078b85e274691c986489903bf3a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2872
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Diffstat (limited to 'ops/gerrit-tvl/HttpModule.java')
-rw-r--r--ops/gerrit-tvl/HttpModule.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/ops/gerrit-tvl/HttpModule.java b/ops/gerrit-tvl/HttpModule.java
new file mode 100644
index 000000000000..6d785c0817fc
--- /dev/null
+++ b/ops/gerrit-tvl/HttpModule.java
@@ -0,0 +1,14 @@
+package su.tvl.gerrit;
+
+import com.google.gerrit.extensions.registration.DynamicSet;
+import com.google.gerrit.extensions.webui.JavaScriptPlugin;
+import com.google.gerrit.extensions.webui.WebUiPlugin;
+import com.google.inject.servlet.ServletModule;
+
+public final class HttpModule extends ServletModule {
+
+  @Override
+  protected void configureServlets() {
+    DynamicSet.bind(binder(), WebUiPlugin.class).toInstance(new JavaScriptPlugin("tvl.js"));
+  }
+}