aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcpettet <rush@wikimedia.org>2014-11-10 09:20:26 -0600
committercpettet <rush@wikimedia.org>2014-11-10 09:20:26 -0600
commit0fc190dc9980e5f5c883cae358804e97eb280506 (patch)
tree44a2abfc366a6527886f313f6cca53aee9cc524e
parent15d70264912dc5488943b65f7a1de4ffb65d91da (diff)
fixes T881
-rwxr-xr-xbugzilla_create.py2
-rwxr-xr-xwmfphablib/bzlib.py5
2 files changed, 5 insertions, 2 deletions
diff --git a/bugzilla_create.py b/bugzilla_create.py
index 13fe05b..873637f 100755
--- a/bugzilla_create.py
+++ b/bugzilla_create.py
@@ -235,7 +235,7 @@ def create(bugid):
ccphids.append(mailinglist_phid(assignee))
vlog("Ticket Info: %s" % (desc_block,))
- ticket = phab.maniphest.createtask(title=buginfo['summary'],
+ ticket = phab.maniphest.createtask(title=buginfo['summary'],
description=full_description,
projectPHIDs=phids,
ccPHIDs=ccphids,
diff --git a/wmfphablib/bzlib.py b/wmfphablib/bzlib.py
index 62e70e3..8b7f733 100755
--- a/wmfphablib/bzlib.py
+++ b/wmfphablib/bzlib.py
@@ -22,6 +22,9 @@ def build_comment(c):
""" takes a native bz comment dict and outputs
a dict ready for processing into phab
"""
+
+ dupe_literals = ['This bug has been marked as a duplicate of bug',
+ 'has been marked as a duplicate of this bug']
clean_c = {}
clean_c['author'] = c['author'].split('@')[0]
clean_c['creation_time'] = str(c['creation_time'])
@@ -45,7 +48,7 @@ def build_comment(c):
for t in text:
if t.startswith('Created attachment'):
continue
- elif t.startswith('***'):
+ elif '***' in t and any(map(lambda l: l in t, dupe_literals)):
fmt_text.append('%%%{0}%%%'.format(t))
else:
fmt_text.append(t)