From 6f48f94585b648277f678be1c405be78a5eca674 Mon Sep 17 00:00:00 2001 From: Andrew Hutchings Date: Wed, 8 Feb 2012 20:39:23 +0000 Subject: [PATCH] Add support for LP: #nnnnnn bug format Fixes bug: 928444 Change-Id: Iab6b9206e4fad8bb64c4c8d8002950ab63d334af --- modules/gerrit/manifests/init.pp | 4 ++-- tools/rfc.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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'