git cl status: differentiate "dry-run" from generic "commit".

CQ vote       now       before
  +2       "commit"    "commit"
  +1       "dry-run"   "commit"

R=ehmaldonado

Tested: manual "git cl status" run locally.
Change-Id: I342a3ac0830a67bf0e722c737ef00460a0df4b98
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1548287
Auto-Submit: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
changes/87/1548287/2
Andrii Shyshkalov 6 years ago committed by Commit Bot
parent 8d3ba46327
commit 3c830222ae

@ -2064,6 +2064,7 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase):
* 'waiting' - waiting for review
* 'reply' - waiting for uploader to reply to review
* 'lgtm' - Code-Review label has been set
* 'dry-run' - dry-running in the commit queue
* 'commit' - in the commit queue
* 'closed' - successfully submitted or abandoned
"""
@ -2079,9 +2080,10 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase):
if data['status'] in ('ABANDONED', 'MERGED'):
return 'closed'
if data['labels'].get('Commit-Queue', {}).get('approved'):
# The section will have an "approved" subsection if anyone has voted
# the maximum value on the label.
cq_label = data['labels'].get('Commit-Queue', {})
if cq_label.get('value') == 1:
return 'dry-run'
if cq_label.get('value') == 2:
return 'commit'
if data['labels'].get('Code-Review', {}).get('approved'):

Loading…
Cancel
Save