mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
scripts: rfr: fix urls with digits
With just (\d+), the very first regex would find a number within a longer string, which for the following example would be wrongly 3, not 2318270. Make it match just a number and nothing else. Interestingly, plain number search would work for most gerrit urls, but let's be specific to avoid accidents. example: https://git-master.nvidia.com/r/c/3rdparty/qnx/src/+/2318270 Also make the list more concise by joining almost identical pairs that differ by just one character: use "?" to make the character optional. Change-Id: Ia1b2ee4270c599ec7bcc2c4375c8a8f498043b27 Signed-off-by: Konsta Hölttä <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2318496 Reviewed-by: automaticguardword <automaticguardword@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
Alex Waterman
parent
002fb2431d
commit
0cd5502935
17
scripts/rfr
17
scripts/rfr
@@ -44,17 +44,12 @@ to_addr = 'sw-mobile-nvgpu-core <sw-mobile-nvgpu-core@exchange.nvidia.com>'
|
|||||||
|
|
||||||
# Gerrit commit URL formats. These are regular expressions to match the
|
# Gerrit commit URL formats. These are regular expressions to match the
|
||||||
# incoming URLs against.
|
# incoming URLs against.
|
||||||
gr_fmts = [ r'(\d+)',
|
gr_fmts = [ r'^(\d+)$',
|
||||||
r'http://git-master/r/(\d+)',
|
r'https?://git-master/r/(\d+)',
|
||||||
r'http://git-master/r/#/c/(\d+)/',
|
r'https?://git-master/r/#/c/(\d+)/',
|
||||||
r'http://git-master.nvidia.com/r/(\d+)',
|
r'https?://git-master.nvidia.com/r/(\d+)',
|
||||||
r'http://git-master.nvidia.com/r/#/c/(\d+)/',
|
r'https?://git-master.nvidia.com/r/#/c/(\d+)/?',
|
||||||
r'https://git-master/r/(\d+)',
|
r'https?://git-master.nvidia.com/r/c/(?:[\w\-_\/]+?)\+/(\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/(\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.
|
# The user to use. May be overridden but the default comes from the environment.
|
||||||
user = os.environ['USER']
|
user = os.environ['USER']
|
||||||
|
|||||||
Reference in New Issue
Block a user