def GetStatus(self):
    "Apply a rough heuristic to give a simple summary of an issue's review\n    or CQ status, assuming adherence to a common workflow.\n\n    Returns None if no issue for this branch, or one of the following keywords:\n      * 'error'   - error from review tool (including deleted issues)\n      * 'unsent'  - not sent for review\n      * 'waiting' - waiting for review\n      * 'reply'   - waiting for owner to reply to review\n      * 'lgtm'    - LGTM from at least one approved reviewer\n      * 'commit'  - in the commit queue\n      * 'closed'  - closed\n    "
    if (not self.GetIssue()):
        return None
    try:
        props = self.GetIssueProperties()
    except urllib2.HTTPError:
        return 'error'
    if props.get('closed'):
        return 'closed'
    if (props.get('commit') and (not props.get('cq_dry_run', False))):
        return 'commit'
    try:
        reviewers = self.GetApprovingReviewers()
    except urllib2.HTTPError:
        return 'error'
    if reviewers:
        return 'lgtm'
    messages = (props.get('messages') or [])
    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']):
            messages.pop()
        else:
            break
    if (not messages):
        return 'unsent'
    if (messages[(- 1)]['sender'] != props.get('owner_email')):
        return 'reply'
    return 'waiting'
Apply a rough heuristic to give a simple summary of an issue's review
or CQ status, assuming adherence to a common workflow.

Returns None if no issue for this branch, or one of the following keywords:
  * 'error'   - error from review tool (including deleted issues)
  * 'unsent'  - not sent for review
  * 'waiting' - waiting for review
  * 'reply'   - waiting for owner to reply to review
  * 'lgtm'    - LGTM from at least one approved reviewer
  * 'commit'  - in the commit queue
  * 'closed'  - closed
def GetStatus(self):
    "Apply a rough heuristic to give a simple summary of an issue's review\n    or CQ status, assuming adherence to a common workflow.\n\n    Returns None if no issue for this branch, or one of the following keywords:\n      * 'error'   - error from review tool (including deleted issues)\n      * 'unsent'  - not sent for review\n      * 'waiting' - waiting for review\n      * 'reply'   - waiting for owner to reply to review\n      * 'lgtm'    - LGTM from at least one approved reviewer\n      * 'commit'  - in the commit queue\n      * 'closed'  - closed\n    "
    if (not self.GetIssue()):
        return None
    try:
        props = self.GetIssueProperties()
    except urllib2.HTTPError:
        return 'error'
    if props.get('closed'):
        return 'closed'
    if (props.get('commit') and (not props.get('cq_dry_run', False))):
        return 'commit'
    try:
        reviewers = self.GetApprovingReviewers()
    except urllib2.HTTPError:
        return 'error'
    if reviewers:
        return 'lgtm'
    messages = (props.get('messages') or [])
    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']):
            messages.pop()
        else:
            break
    if (not messages):
        return 'unsent'
    if (messages[(- 1)]['sender'] != props.get('owner_email')):
        return 'reply'
    return 'waiting'