1
0
Fork 0
mirror of https://gitlab.wikimedia.org/ladsgroup/Phabricator-maintenance-bot synced 2024-09-19 21:58:49 +02:00

Fix the regex for patch-for-review comment checker

After upgrading gerrit, this broke as the URL schema changed.
This commit is contained in:
Amir Sarabadani 2020-07-01 20:50:02 +02:00
parent a4796e5b68
commit dbb3ee2c40

View file

@ -39,7 +39,7 @@ class Checker():
return False return False
raw_comment = case['comments'][0]['content']['raw'] raw_comment = case['comments'][0]['content']['raw']
gerrit_patch_id = re.findall( gerrit_patch_id = re.findall(
r'https\:\/\/gerrit\.wikimedia\.org\/r\/(\d+)', raw_comment)[0] r'https://gerrit(?:-test|)\.wikimedia\.org/r/.*(\d+)(?:$|\]\])', raw_comment)[0]
merged = re.findall( merged = re.findall(
r'Change \d+ (?:\*\*merged\*\*|abandoned) by ', r'Change \d+ (?:\*\*merged\*\*|abandoned) by ',
raw_comment) raw_comment)