'last_change_time': fromTime, }]) } for bug in bingle.getBugEntries(bugzillaPayload): bingle.info("Bug XML: %s" % bug) bugCardName = bingle.generateBugCardName( bug.get('id', '---'), bug.get('summary').encode('ascii', 'ignore')) # see if there's a mingle card matching this bug if len(bugIdFieldName) > 0: foundBug = mingle.findCardNumByBugId(bugCard, bug.get('id'), bugIdFieldName) else: foundBug = mingle.findCardNumByName(bugCard, bugCardName) bingle.info(mingle.dumpRequest()) if len(foundBug) > 0: bingle.info('Existing card(s) %s match bug %s, so skip it.' % (','.join([str(m['Number']) for m in foundBug]), bug.get('id'))) continue else: bingle.info('Did not find card matching bug %s, so add it.' % (bug.get('id'))) # retrieve bug comments comment_payload = { 'method': 'Bug.comments', 'params': json.dumps([{ 'ids': ['%s' % bug.get('id')]
'component': component, 'status': ['UNCONFIRMED', 'NEW'], 'last_change_time': fromTime, }])} for bug in bingle.getBugEntries(bugzillaPayload): bingle.info("Bug XML: %s" % bug) bugCardName = bingle.generateBugCardName( bug.get('id', '---'), bug.get('summary').encode('ascii', 'ignore')) # see if there's a mingle card matching this bug if len(bugIdFieldName) > 0: foundBug = mingle.findCardNumByBugId( bugCard, bug.get('id'), bugIdFieldName) else: foundBug = mingle.findCardNumByName( bugCard, bugCardName) bingle.info(mingle.dumpRequest()) if len(foundBug) > 0: bingle.info('Existing card(s) %s match bug %s, so skip it.' % ( ','.join([str(m['Number']) for m in foundBug]), bug.get('id'))) continue else: bingle.info('Did not find card matching bug %s, so add it.' % (bug.get('id'))) # retrieve bug comments comment_payload = {'method': 'Bug.comments', 'params': json.dumps( [{'ids': ['%s' % bug.get('id')]}])} comments = bingle.getBugComments(comment_payload, bug.get('id')) link = '<br><p>Full bug report at https://bugzilla.wikimedia.org/%s' \