Index: git_cl.py |
diff --git a/git_cl.py b/git_cl.py |
index ab28a9ca159f041251fbe9023363750e5363f3f4..8a26c92244cce05da03930063ab7d0dcb61ea221 100755 |
--- a/git_cl.py |
+++ b/git_cl.py |
@@ -64,6 +64,7 @@ import watchlists |
__version__ = '2.0' |
+COMMIT_BOT_EMAIL = 'commit-bot@chromium.org' |
DEFAULT_SERVER = 'https://codereview.appspot.com' |
POSTUPSTREAM_HOOK_PATTERN = '.git/hooks/post-cl-%s' |
DESCRIPTION_BACKUP_FILE = '~/.git_cl_description_backup' |
@@ -1707,11 +1708,23 @@ class _RietveldChangelistImpl(_ChangelistCodereviewBase): |
messages = props.get('messages') or [] |
+ # Skip CQ messages that don't require owner's action. |
+ while messages and messages[-1]['sender'] == COMMIT_BOT_EMAIL: |
+ if 'Dry run:' in messages[-1]['text']: |
+ messages.pop() |
+ elif 'The CQ bit was unchecked' in messages[-1]['text']: |
+ # This messages always follows prior messages from CQ, |
Sergiy Byelozyorov
2016/06/22 04:10:46
s/massages/message/
tandrii(chromium)
2016/06/22 10:38:57
Done.
|
+ # so skip this too. |
+ messages.pop() |
+ else: |
+ # This is probably a CQ messages warranting user attention. |
+ break |
+ |
if not messages: |
# No message was sent. |
return 'unsent' |
if messages[-1]['sender'] != props.get('owner_email'): |
- # Non-LGTM reply from non-owner |
+ # Non-LGTM reply from non-owner and not CQ bot. |
return 'reply' |
return 'waiting' |