mirror of
https://gitlab.wikimedia.org/ladsgroup/Phabricator-maintenance-bot
synced 2024-10-30 00:37:10 +01:00
patchforreview_remover: Update for adding the # to patch numbers
See T358940 and T363573 Bug: T363573
This commit is contained in:
parent
9cee4b7510
commit
982cfc2f33
1 changed files with 3 additions and 3 deletions
|
@ -43,10 +43,10 @@ class Checker():
|
|||
return "close"
|
||||
|
||||
# Gerrit style
|
||||
if re.search(r"Change \d+ had a related patch set uploaded", raw_comment):
|
||||
if re.search(r"Change #?\d+ had a related patch set uploaded", raw_comment):
|
||||
return "open"
|
||||
|
||||
if re.search(r'Change \d+ \*\*(?:merged|abandoned)\*\* by ', raw_comment):
|
||||
if re.search(r'Change #?\d+ \*\*(?:merged|abandoned)\*\* by ', raw_comment):
|
||||
return "close"
|
||||
|
||||
return None
|
||||
|
@ -94,7 +94,7 @@ class Checker():
|
|||
for patch in gerrit_patch_status:
|
||||
# The normal sequence of GerritBot transactions for a Gerrit change is "Change
|
||||
# \d+ had a related patch set uploaded" (indicated by True in
|
||||
# gerrit_patch_status) eventually followed by "Change \d+ (merged|abandoned)
|
||||
# gerrit_patch_status) eventually followed by "Change #?\d+ (merged|abandoned)
|
||||
# by whoever" (indicated by False in gerrit_patch_status). The transactions
|
||||
# are returned in reverse order so the opened/merged pattern will appear as
|
||||
# the reverse of [True, False], which is [False, True].
|
||||
|
|
Loading…
Reference in a new issue