diff --git a/modules/gerrit/manifests/init.pp b/modules/gerrit/manifests/init.pp index a086a7df4a..ce9cbf609a 100644 --- a/modules/gerrit/manifests/init.pp +++ b/modules/gerrit/manifests/init.pp @@ -40,6 +40,8 @@ # Gerrit configuration options; see Gerrit docs. # commentlinks: # A list of regexes Gerrit should hyperlink. +# trackingids: +# A list of regexes to reference external tracking systems. # war: # The URL of the Gerrit WAR that should be downloaded and installed. # Note that only the final component is used for comparing to the most @@ -136,6 +138,7 @@ class gerrit( $httpd_maxthreads = '', $httpd_maxwait = '', $commentlinks = [], + $trackingids = [], $contactstore = false, $contactstore_appsec = '', $contactstore_pubkey = '', @@ -293,6 +296,7 @@ class gerrit( # - $httpd_minthreads # - $httpd_maxthreads # - $commentlinks + # - $trackingids # - $enable_melody # - $melody_session # - $gitweb diff --git a/modules/gerrit/templates/gerrit.config.erb b/modules/gerrit/templates/gerrit.config.erb index 44a6452ea8..d93882c64c 100644 --- a/modules/gerrit/templates/gerrit.config.erb +++ b/modules/gerrit/templates/gerrit.config.erb @@ -89,6 +89,12 @@ html = "<%= commentlink['html'] %>" <% end -%> <% end -%> +<% @trackingids.each do |trackingid| -%> +[trackingid "<%= trackingid['name'] %>"] + match = "<%= trackingid['match'] %>" + footer = "<%= trackingid['footer'] %>" + system = "<%= trackingid['system'] %>" +<% end -%> [theme] backgroundColor = ffffff topMenuColor = ffffff diff --git a/modules/openstack_project/manifests/gerrit.pp b/modules/openstack_project/manifests/gerrit.pp index f7f98fa99d..d425cb3890 100644 --- a/modules/openstack_project/manifests/gerrit.pp +++ b/modules/openstack_project/manifests/gerrit.pp @@ -177,6 +177,14 @@ class openstack_project::gerrit ( html => '$1$2$3', }, ], + trackingids => [ + { + name => 'storyboard', + footer => 'story:', + match => '\\#?(\\d+)', + system => 'Storyboard', + }, + ], war => $war, contactstore => $contactstore, contactstore_appsec => $contactstore_appsec,