Convert commentlinks to new no html system

Gerrit 3.8 drops support for html in commentlinks entirely. Gerrit 3.7
supports both html and the new non html system. Update our 3.7
installation to the new system on 3.7 so that we are ready for the
Gerrit 3.8 upgrade later.

Most of our comment links did not use html entries so we drop the html
lines entirely. A single commentlink does use html and there we convert
it to the new prefix, link, text, suffix system. More details can be
found here:

  https://gerrit.googlesource.com/gerrit/+/refs/tags/v3.8.2/tools/migration/html_to_link_commentlink.md

This should be a 1:1 mapping for our config and not change any behavior.

Change-Id: I0b87aac7b90814d242338be8fd03cfc9a76200f7
This commit is contained in:
Clark Boylan 2023-10-20 14:04:18 -07:00 committed by Clark Boylan
parent 69eaeeab88
commit 8f9b1f2c9c

View File

@ -99,35 +99,30 @@
[commentlink "bugheader"]
match = "([Cc]loses|[Pp]artial|[Rr]elated)-[Bb]ug:\\s*#?(\\d+)"
link = https://launchpad.net/bugs/$2
html =
[commentlink "bug"]
match = "\\b[Bb]ug:? #?(\\d+)"
link = https://launchpad.net/bugs/$1
html =
[commentlink "story"]
match = "\\b[Ss]tory:? #?(\\d+)"
link = "{{ gerrit_storyboard_url }}/#!/story/$1"
html =
[commentlink "task"]
match = "\\b[Tt]ask:? #?(\\d+)"
link = "{{ gerrit_storyboard_url }}/#!/task/$1"
html =
[commentlink "its-storyboard"]
match = "\\b[Tt]ask:? #?(\\d+)"
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 =
[commentlink "changeid"]
match = (I[0-9a-f]{8,40})
link = "/#/q/$1"
html =
[commentlink "gitsha"]
match = "(<p>|[\\s(])([0-9a-f]{40})(</p>|[\\s.,;:)])"
link =
html = "$1<a href=\"/#/q/$2\">$2</a>$3"
link = "/#/q/$2"
prefix = $1
text = $2
suffix = $3
[its-storyboard]
url = {{ gerrit_storyboard_url }}
[trackingid "launchpad-bug"]