scripts: rfr: fix url regexes for good

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ä <kholtta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2361787
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Konsta Hölttä
2020-06-16 20:18:56 +03:00
committed by Alex Waterman
parent b8c6ad3f5f
commit e3240db272

View File

@@ -45,11 +45,9 @@ to_addr = 'sw-mobile-nvgpu-core <sw-mobile-nvgpu-core@exchange.nvidia.com>'
# 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']