From 9443c3de049368a551e64d029a984a38c2bd066e Mon Sep 17 00:00:00 2001 From: Jimmy Berry Date: Fri, 4 Aug 2017 13:32:07 -0500 Subject: [PATCH] ReviewBot: comment_write(): include target in debug message when too similar. --- ReviewBot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ReviewBot.py b/ReviewBot.py index 437c46b5..effea4a0 100644 --- a/ReviewBot.py +++ b/ReviewBot.py @@ -446,15 +446,16 @@ class ReviewBot(object): comments = self.comment_api.get_comments(**kwargs) comment, _ = self.comment_api.comment_find(comments, self.bot_name, info) + debug_key = '/'.join(kwargs.values()) if (comment is not None and ((identical and comment['comment'] == message) or (not identical and comment['comment'].count('\n') == message.count('\n'))) ): # Assume same state/result and number of lines in message is duplicate. - self.logger.debug('previous comment too similar to bother commenting again') + self.logger.debug('previous comment on {} too similar'.format(debug_key)) return - self.logger.debug('adding comment to {}: {}'.format('/'.join(kwargs.values()), message)) + self.logger.debug('adding comment to {}: {}'.format(debug_key, message)) if not self.dryrun: if comment is None: