diff --git a/modules/gerrit/manifests/init.pp b/modules/gerrit/manifests/init.pp index 3caac10e08..cee7a6ed16 100644 --- a/modules/gerrit/manifests/init.pp +++ b/modules/gerrit/manifests/init.pp @@ -7,11 +7,11 @@ $commentlinks = [ { name => 'changeid', link => '#q,$1,n,z' }, { name => 'launchpad', - match => '([Bb]ug|[Ll][Pp])\\s*[#:]?\\s*(\\d+)', + match => '([Bb]ug|[Ll][Pp])[\\s#:]*(\\d+)', link => 'https://code.launchpad.net/bugs/$2' }, { name => 'blueprint', - match => '([Bb]lue[Pp]rint|[Bb][Pp])\\s*[#:]?\\s*([A-Za-z0-9\\-]+)', + match => '([Bb]lue[Pp]rint|[Bb][Pp])[\\s#:]*([A-Za-z0-9\\-]+)', link => 'https://blueprints.launchpad.net/openstack/?searchtext=$2' }, ] diff --git a/tools/rfc.sh b/tools/rfc.sh index ed287e8b43..dcb1dd7fa9 100755 --- a/tools/rfc.sh +++ b/tools/rfc.sh @@ -111,9 +111,9 @@ main() assert_diverge; - bug=$(git show --format='%s %b' | perl -nle 'if (/\b([Bb]ug|[Ll][Pp])\s*[#:]?\s*(\d+)/) {print "$2"; exit}') + bug=$(git show --format='%s %b' | perl -nle 'if (/\b([Bb]ug|[Ll][Pp])[\s#:]*(\d+)/) {print "$2"; exit}') - bp=$(git show --format='%s %b' | perl -nle 'if (/\b([Bb]lue[Pp]rint|[Bb][Pp])\s*[#:]?\s*([0-9a-zA-Z-_]+)/) {print "$2"; exit}') + bp=$(git show --format='%s %b' | perl -nle 'if (/\b([Bb]lue[Pp]rint|[Bb][Pp])[\s#:]*([0-9a-zA-Z-_]+)/) {print "$2"; exit}') if [ "$DRY_RUN" = 1 ]; then drier='echo -e Please use the following command to send your commits to review:\n\n'