Gerrit git cl status: do not treat CQ comment as reviewer reply.
R=sergiyb@chromium.org,agable@chromium.org
BUG=
Change-Id: I7684923c19fe7441cdd52b7707c28f01c95a4ba4
Reviewed-on: https://chromium-review.googlesource.com/433699
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
diff --git a/git_cl.py b/git_cl.py
index 839d2e5..ef702b9 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -2387,13 +2387,15 @@
return 'unsent'
messages = data.get('messages', [])
- if messages:
- owner = data['owner'].get('_account_id')
- last_message_author = messages[-1].get('author', {}).get('_account_id')
- if owner != last_message_author:
+ owner = data['owner'].get('_account_id')
+ while messages:
+ last_message_author = messages.pop().get('author', {})
+ if last_message_author.get('email') == COMMIT_BOT_EMAIL:
+ # Ignore replies from CQ.
+ continue
+ if owner != last_message_author.get('_account_id'):
# Some reply from non-owner.
return 'reply'
-
return 'waiting'
def GetMostRecentPatchset(self):