'method': 'Bug.add_comment', 'id': 1, 'params': [{ 'id': '%s' % bug.get('id'), 'Bugzilla_login': config.get('auth_bugzilla', 'username'), 'Bugzilla_password': config.get('auth_bugzilla', 'password'), 'comment': comment }] } bingle.addBugComment(bugzilla_payload, bug.get('id')) if options.reconcile: # handle resolved bingle.info("Preparing to reconcile bugs marked as resolved in BZ \ with Mingle.") bingle.info("Pretend mode: %s" % options.pretend) bingle.info("Ignoring bugs in: %s" % mingleIgnoreResolved) bingleResolved.execute(bingle=bingle, mingle=mingle, pretend=options.pretend, fromTime=fromTime) bingle.info("Done reconciling resolved bugs.") bingle.updatePickleTime()
bingle.info(mingle.dumpRequest()) # post comment with mingle card it back to bugzilla bug pos = cardLocation.rfind('/') cardId = cardLocation[pos:-4] comment = 'Prioritization and scheduling of this bug is tracked on ' \ 'Mingle card %scards%s' % (mingleUrlBase, cardId) bugzilla_payload = { 'jsonrpc': '1.1', 'method': 'Bug.add_comment', 'id': 1, 'params': [{ 'id': '%s' % bug.get('id'), 'Bugzilla_login': config.get('auth_bugzilla', 'username'), 'Bugzilla_password': config.get('auth_bugzilla', 'password'), 'comment': comment }] } bingle.addBugComment(bugzilla_payload, bug.get('id')) if options.reconcile: # handle resolved bingle.info("Preparing to reconcile bugs marked as resolved in BZ \ with Mingle.") bingle.info("Pretend mode: %s" % options.pretend) bingle.info("Ignoring bugs in: %s" % mingleIgnoreResolved) bingleResolved.execute(bingle=bingle, mingle=mingle, pretend=options.pretend, fromTime=fromTime) bingle.info("Done reconciling resolved bugs.") bingle.updatePickleTime()
'</p>' % bugId # set common mingle parameters description = comments.get('comments')[0].get('text').replace( "\n", "<br />") + link # add card to current board result = trello.postNewCard(cardTitle, html2text.html2text(description), tListId) # post comment back to bz comment = 'Prioritization and scheduling of this bug is tracked on ' \ 'Trello card %s' % (result.json().get('shortUrl')) bugzilla_payload = { 'jsonrpc': '1.1', 'method': 'Bug.add_comment', 'id': 1, 'params': [{ 'id': '%s' % bugId, 'Bugzilla_login': config.get('auth_bugzilla', 'username'), 'Bugzilla_password': config.get('auth_bugzilla', 'password'), 'comment': comment }] } bingle.addBugComment(bugzilla_payload, bugId) # post additional comments comments = comments.get('comments')[1:] for comment in comments: trelloComment = '%s ~%s' % (comment.get('text'), comment.get('author')) trello.postComment(result.json().get('id'), trelloComment) bingle.updatePickleTime()
# post comment back to bz comment = 'Prioritization and scheduling of this bug is tracked on ' \ 'Trello card %s' % (result.json().get('shortUrl')) bugzilla_payload = { 'jsonrpc': '1.1', 'method': 'Bug.add_comment', 'id': 1, 'params': [{ 'id': '%s' % bugId, 'Bugzilla_login': config.get('auth_bugzilla', 'username'), 'Bugzilla_password': config.get('auth_bugzilla', 'password'), 'comment': comment }] } bingle.addBugComment(bugzilla_payload, bugId) # post additional comments comments = comments.get('comments')[1:] for comment in comments: trelloComment = '%s ~%s' % (comment.get('text'), comment.get('author')) trello.postComment(result.json().get('id'), trelloComment) bingle.updatePickleTime()