Commit 9d2c7a3d authored by tandrii's avatar tandrii Committed by Commit bot

Rietveld git cl status: ignore CQ dry run and generated messages.

R=sergiyb@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2083063002
parent e32e3eae
......@@ -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 message always follows prior messages from CQ,
# 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'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment