From fee2aba4cd109f1060023a08cee5441ff1d1c804 Mon Sep 17 00:00:00 2001
From: Ian Wienand <iwienand@redhat.com>
Date: Mon, 11 Oct 2021 08:33:46 +1100
Subject: [PATCH] gerrit: Update quotes for 3.3

The gerrit config diff after the 3.3 ugprade [1] seems to remove some
quotes.  We also quote the bug URL, because it seems to think the
trailing # is a comment now.

[1] https://etherpad.opendev.org/p/gerrit-upgrade-3.3

Change-Id: I3ca0ec925a0e6da33a1cbe2333c118b1baa7257c
---
 .../roles/gerrit/templates/gerrit.config.j2   | 44 +++++++++----------
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/playbooks/roles/gerrit/templates/gerrit.config.j2 b/playbooks/roles/gerrit/templates/gerrit.config.j2
index bb4f059e17..7c93d6f778 100644
--- a/playbooks/roles/gerrit/templates/gerrit.config.j2
+++ b/playbooks/roles/gerrit/templates/gerrit.config.j2
@@ -6,7 +6,7 @@
 	canonicalWebUrl = https://{{ gerrit_vhost_name }}/
 	changeScreen = OLD_UI
 	reportBugText = Get Help
-	reportBugUrl = https://docs.openstack.org/infra/system-config/project.html#contributing
+	reportBugUrl = "https://docs.openstack.org/infra/system-config/project.html#contributing"
 	gitHttpUrl = https://{{ gerrit_vhost_name }}/
 	serverId = {{ gerrit_serverid }}
 {% if not gerrit_run_init_dev_mode %}
@@ -83,52 +83,52 @@
 	enableSignedPush = false
 [commentlink "bugheader"]
 	match = "([Cc]loses|[Pp]artial|[Rr]elated)-[Bb]ug:\\s*#?(\\d+)"
-	link = "https://launchpad.net/bugs/$2"
-	html = ""
+	link = https://launchpad.net/bugs/$2
+	html =
 [commentlink "bug"]
 	match = "\\b[Bb]ug:? #?(\\d+)"
-	link = "https://launchpad.net/bugs/$1"
-	html = ""
+	link = https://launchpad.net/bugs/$1
+	html =
 [commentlink "story"]
 	match = "\\b[Ss]tory:? #?(\\d+)"
 	link = "{{ gerrit_storyboard_url }}/#!/story/$1"
-	html = ""
+	html =
 [commentlink "task"]
 	match = "\\b[Tt]ask:? #?(\\d+)"
 	link = "{{ gerrit_storyboard_url }}/#!/task/$1"
-	html = ""
+	html =
 [commentlink "its-storyboard"]
 	match = "\\b[Tt]ask:? #?(\\d+)"
-	link = "task: $1"
-	html = ""
+	link = task: $1
+	html =
 [commentlink "blueprint"]
 	match = "(\\b[Bb]lue[Pp]rint\\b|\\b[Bb][Pp]\\b)[ \\t#:]*([A-Za-z0-9\\-]+)"
-	link = "https://blueprints.launchpad.net/openstack/?searchtext=$2"
-	html = ""
+	link = https://blueprints.launchpad.net/openstack/?searchtext=$2
+	html =
 [commentlink "changeid"]
-	match = "(I[0-9a-f]{8,40})"
+	match = (I[0-9a-f]{8,40})
 	link = "/#/q/$1"
-	html = ""
+	html =
 [commentlink "gitsha"]
 	match = "(<p>|[\\s(])([0-9a-f]{40})(</p>|[\\s.,;:)])"
-	link = ""
+	link =
 	html = "$1<a href=\"/#/q/$2\">$2</a>$3"
 [its-storyboard]
 	url = {{ gerrit_storyboard_url }}
 [trackingid "launchpad-bug"]
 	match = "\\#?(\\d+)"
-	footer = "closes-bug:"
-	footer = "partial-bug:"
-	footer = "related-bug:"
-	system = "Launchpad"
+	footer = closes-bug:
+	footer = partial-bug:
+	footer = related-bug:
+	system = Launchpad
 [trackingid "storyboard-story"]
 	match = "\\#?(\\d+)"
-	footer = "story:"
-	system = "Storyboard"
+	footer = story:
+	system = Storyboard
 [trackingid "storyboard-task"]
 	match = "\\#?(\\d+)"
-	footer = "task:"
-	system = "Storyboard"
+	footer = task:
+	system = Storyboard
 [theme]
 	backgroundColor = ffffff
 	topMenuColor = ffffff