From e3240db272b7b46e46d02a8a4ea12663bd18a772 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konsta=20H=C3=B6ltt=C3=A4?= Date: Tue, 16 Jun 2020 20:18:56 +0300 Subject: [PATCH] scripts: rfr: fix url regexes for good MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make the .nvidia.com part more correct by escaping the all-matching dots, and optional for also the more modern formats because some tools still produce them. Add a dot in the project part (e.g. linux-5.9). Change-Id: Iad54b3160a9c422889a61d5f326c3d637b3f4b80 Signed-off-by: Konsta Hölttä Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2361787 Tested-by: mobile promotions Reviewed-by: Alex Waterman Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit --- scripts/rfr | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/rfr b/scripts/rfr index 50786a5ea..5c61e3d2a 100755 --- a/scripts/rfr +++ b/scripts/rfr @@ -45,11 +45,9 @@ to_addr = 'sw-mobile-nvgpu-core ' # Gerrit commit URL formats. These are regular expressions to match the # incoming URLs against. gr_fmts = [ r'^(\d+)$', - r'https?://git-master/r/(\d+)', - r'https?://git-master/r/#/c/(\d+)/', - r'https?://git-master.nvidia.com/r/(\d+)', - r'https?://git-master.nvidia.com/r/#/c/(\d+)/?', - r'https?://git-master.nvidia.com/r/c/(?:[\w\-_\/]+?)\+/(\d+)' ] + r'https?://git-master(?:\.nvidia\.com)?/r/(\d+)', + r'https?://git-master(?:\.nvidia\.com)?/r/#/c/(\d+)/?', + r'https?://git-master(?:\.nvidia\.com)?/r/c/(?:[\w\-_\/\.]+?)\+/(\d+)' ] # The user to use. May be overridden but the default comes from the environment. user = os.environ['USER']