diff --git a/git_cl.py b/git_cl.py index 8ba9e31527..1ae46c6862 100755 --- a/git_cl.py +++ b/git_cl.py @@ -1919,6 +1919,10 @@ class Changelist(object): @staticmethod def _BuildCommentSummary(msg, comments, readable): + if 'email' not in msg['author']: + # Some bot accounts may not have an email associated. + return None + key = (msg['author']['email'], msg['date']) # Don't bother showing autogenerated messages that don't have associated # file or line comments. this will filter out most autogenerated diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py index 653b940c46..a88c5e3a2a 100755 --- a/tests/git_cl_test.py +++ b/tests/git_cl_test.py @@ -2663,6 +2663,16 @@ class TestGitCl(unittest.TestCase): u'id': u'f5a6c25ecbd3b3b54a43ae418ed97eff046d4568', u'message': u'Patch Set 2: Code-Review+1', }, + { + u'_revision_number': 2, + u'author': { + u'_account_id': 42, + u'name': u'reviewer' + }, + u'date': u'2017-03-17 05:19:37.900000000', + u'id': u'f5a6c25ecbd3b3b54a43ae418ed97eff046d0000', + u'message': u'A bot with no email set', + }, ] } self.calls = [