mirror of
https://gitlab.wikimedia.org/ladsgroup/Phabricator-maintenance-bot
synced 2024-12-22 10:30:53 +01:00
Fix gerrit_patch_id regexp
Change the gerrit_patch_id regexp from r'https://gerrit(?:-test|)\.wikimedia\.org/r/.*(\d+)(?:$|\]\])' to r'https://gerrit(?:-test|)\.wikimedia\.org/r/(\d+)(?:$|\]\])' The .* in the old regexp was collecting most of the digits expected to be matched by the (\d+). For example if the input was https://gerrit.wikimedia.org/r/875932, the collected digits would just be "2".
This commit is contained in:
parent
9b64c4b501
commit
10c6aace45
1 changed files with 1 additions and 1 deletions
|
@ -51,7 +51,7 @@ class Checker():
|
|||
return False
|
||||
raw_comment = case['comments'][0]['content']['raw']
|
||||
gerrit_patch_id = re.findall(
|
||||
r'https://gerrit(?:-test|)\.wikimedia\.org/r/.*(\d+)(?:$|\]\])', raw_comment)[0]
|
||||
r'https://gerrit(?:-test|)\.wikimedia\.org/r/(\d+)(?:$|\]\])', raw_comment)[0]
|
||||
merged = re.findall(
|
||||
r'Change \d+ \*\*(?:merged|abandoned)\*\* by ',
|
||||
raw_comment)
|
||||
|
|
Loading…
Reference in a new issue