[git-cl] Expose Gerrit host and project
Make
git cl issue --json=-
print Gerrit host and project as well.
Change-Id: If53d681252eaa738f044a724ee45e70df4b1eef1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2766153
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
Reviewed-by: Dean Berris <dberris@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
diff --git a/git_cl.py b/git_cl.py
index 3bf80cb..4f248fc 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -3746,8 +3746,10 @@
print('Issue number: %s (%s)' % (cl.GetIssue(), cl.GetIssueURL()))
if options.json:
write_json(options.json, {
- 'issue': cl.GetIssue(),
+ 'gerrit_host': cl.GetGerritHost(),
+ 'gerrit_project': cl.GetGerritProject(),
'issue_url': cl.GetIssueURL(),
+ 'issue': cl.GetIssue(),
})
return 0