Make the git web url a template
We have deployed our Gerrit with cgit so the old gitweb urls provided by
Zuul's gerrit connection no longer work. Add in a new config option on
Gerrit connections to specify a url template string which we can modify
to point at our cgit instance. This should in theory also support github
users too.
The default is to continue pointing at Gerrit's built in gitweb
instance.
Change-Id: I91d77e309cfeea0e90a85f926aca9b8c347b0385
diff --git a/doc/source/admin/drivers/gerrit.rst b/doc/source/admin/drivers/gerrit.rst
index ac42bd3..935cb32 100644
--- a/doc/source/admin/drivers/gerrit.rst
+++ b/doc/source/admin/drivers/gerrit.rst
@@ -61,6 +61,17 @@
Path to Gerrit web interface.
+ .. attr:: gitweb_url_template
+ :default: {baseurl}/gitweb?p={project.name}.git;a=commitdiff;h={sha}
+
+ Url template for links to specific git shas. By default this will
+ point at Gerrit's built in gitweb but you can customize this value
+ to point elsewhere (like cgit or github).
+
+ The three values available for string interpolation are baseurl
+ which points back to Gerrit, project and all of its safe attributes,
+ and sha which is the git sha1.
+
.. attr:: user
:default: zuul