Ignore comments from accounts with no email
Those comments are from bots and not useful when running git cl
comments.
R=ajp@google.com
Fixed: 1266986
Change-Id: I6a8f8f81e02e4b4624027c4c95546bf5e3e7244b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3268350
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Andy Perelson <ajp@chromium.org>
Reviewed-by: Andy Perelson <ajp@chromium.org>
diff --git a/git_cl.py b/git_cl.py
index 8ba9e31..1ae46c6 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -1919,6 +1919,10 @@
@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