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>
diff --git a/git_cl.py b/git_cl.py
index 59a9af7..de2ab57 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -2064,6 +2064,7 @@
* '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 @@
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'):