From dfe891af3e78f5e0b52b29982c88baf81cdd9edc Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Thu, 27 Sep 2018 08:15:57 -0500 Subject: [PATCH] Double the gerrit regex backslashes The current amount of backslashes is not good enough for gerrit, and it rejects the config file. Probably related to futureparser? In any case, we need doubled-backslashes in the generated file, so 4 backslashes does the right thing in the puppet. Change-Id: I950b8efbcb876b2d1309f1117626a41ef22025b0 --- modules/openstack_project/manifests/gerrit.pp | 4 ++-- modules/openstack_project/manifests/review.pp | 14 +++++++------- modules/openstack_project/manifests/review_dev.pp | 14 +++++++------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/modules/openstack_project/manifests/gerrit.pp b/modules/openstack_project/manifests/gerrit.pp index d816442916..30e7021d46 100644 --- a/modules/openstack_project/manifests/gerrit.pp +++ b/modules/openstack_project/manifests/gerrit.pp @@ -158,13 +158,13 @@ class openstack_project::gerrit ( { name => 'storyboard-story', footer => 'story:', - match => '\\#?(\\d+)', + match => '\\\\#?(\\\\d+)', system => 'Storyboard', }, { name => 'storyboard-task', footer => 'task:', - match => '\\#?(\\d+)', + match => '\\\\#?(\\\\d+)', system => 'Storyboard', }, ], diff --git a/modules/openstack_project/manifests/review.pp b/modules/openstack_project/manifests/review.pp index eae3b98512..1a96a5653e 100644 --- a/modules/openstack_project/manifests/review.pp +++ b/modules/openstack_project/manifests/review.pp @@ -142,27 +142,27 @@ class openstack_project::review ( commentlinks => [ { name => 'bugheader', - match => '([Cc]loses|[Pp]artial|[Rr]elated)-[Bb]ug:\\s*#?(\\d+)', + match => '([Cc]loses|[Pp]artial|[Rr]elated)-[Bb]ug:\\\\s*#?(\\\\d+)', link => 'https://launchpad.net/bugs/$2', }, { name => 'bug', - match => '\\b[Bb]ug:? #?(\\d+)', + match => '\\\\b[Bb]ug:? #?(\\\\d+)', link => 'https://launchpad.net/bugs/$1', }, { name => 'story', - match => '\\b[Ss]tory:? #?(\\d+)', + match => '\\\\b[Ss]tory:? #?(\\\\d+)', link => 'https://storyboard.openstack.org/#!/story/$1', }, { name => 'its-storyboard', - match => '\\b[Tt]ask:? #?(\\d+)', + match => '\\\\b[Tt]ask:? #?(\\\\d+)', link => 'task: $1', }, { name => 'blueprint', - match => '(\\b[Bb]lue[Pp]rint\\b|\\b[Bb][Pp]\\b)[ \\t#:]*([A-Za-z0-9\\-]+)', + match => '(\\\\b[Bb]lue[Pp]rint\\\\b|\\\\b[Bb][Pp]\\\\b)[ \\\\t#:]*([A-Za-z0-9\\\\-]+)', link => 'https://blueprints.launchpad.net/openstack/?searchtext=$2', }, { @@ -177,7 +177,7 @@ class openstack_project::review ( }, { name => 'launchpadbug', - match => '[^<]+', + match => '[^<]+', html => '$1' }, { @@ -187,7 +187,7 @@ class openstack_project::review ( }, { name => 'gitsha', - match => '(

|[\\s(])([0-9a-f]{40})(

|[\\s.,;:)])', + match => '(

|[\\\\s(])([0-9a-f]{40})(

|[\\\\s.,;:)])', html => '$1$2$3', }, ], diff --git a/modules/openstack_project/manifests/review_dev.pp b/modules/openstack_project/manifests/review_dev.pp index 32c9b39f23..2d563d4cf3 100644 --- a/modules/openstack_project/manifests/review_dev.pp +++ b/modules/openstack_project/manifests/review_dev.pp @@ -89,27 +89,27 @@ class openstack_project::review_dev ( commentlinks => [ { name => 'bugheader', - match => '([Cc]loses|[Pp]artial|[Rr]elated)-[Bb]ug:\\s*#?(\\d+)', + match => '([Cc]loses|[Pp]artial|[Rr]elated)-[Bb]ug:\\\\s*#?(\\\\d+)', link => 'https://launchpad.net/bugs/$2', }, { name => 'bug', - match => '\\b[Bb]ug:? #?(\\d+)', + match => '\\\\b[Bb]ug:? #?(\\\\d+)', link => 'https://launchpad.net/bugs/$1', }, { name => 'story', - match => '\\b[Ss]tory:? #?(\\d+)', + match => '\\\\b[Ss]tory:? #?(\\\\d+)', link => 'https://storyboard-dev.openstack.org/#!/story/$1', }, { name => 'its-storyboard', - match => '\\b[Tt]ask:? #?(\\d+)', + match => '\\\\b[Tt]ask:? #?(\\\\d+)', link => 'task: $1', }, { name => 'blueprint', - match => '(\\b[Bb]lue[Pp]rint\\b|\\b[Bb][Pp]\\b)[ \\t#:]*([A-Za-z0-9\\-]+)', + match => '(\\\\b[Bb]lue[Pp]rint\\\\b|\\\\b[Bb][Pp]\\\\b)[ \\\\t#:]*([A-Za-z0-9\\\\-]+)', link => 'https://blueprints.launchpad.net/openstack/?searchtext=$2', }, { @@ -119,7 +119,7 @@ class openstack_project::review_dev ( }, { name => 'launchpadbug', - match => '[^<]+', + match => '[^<]+', html => '$1' }, { @@ -129,7 +129,7 @@ class openstack_project::review_dev ( }, { name => 'gitsha', - match => '(

|[\\s(])([0-9a-f]{40})(

|[\\s.,;:)])', + match => '(

|[\\\\s(])([0-9a-f]{40})(

|[\\\\s.,;:)])', html => '$1$2$3', }, ],