From cb629a482b3d3c13e46a66031ba4c0cc3679d200 Mon Sep 17 00:00:00 2001 From: Sergiy Byelozyorov Date: Sun, 28 Oct 2018 19:20:39 +0000 Subject: [PATCH] Add an option to publish CL when posting comments R=tandrii@chromium.org Change-Id: Icc4a4432ee51f24bd46001180a009b5b6bff8998 Reviewed-on: https://chromium-review.googlesource.com/c/1296521 Reviewed-by: Andrii Shyshkalov Commit-Queue: Sergiy Byelozyorov --- git_cl.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/git_cl.py b/git_cl.py index 547590b9f..5bf0ff04e 100755 --- a/git_cl.py +++ b/git_cl.py @@ -4519,6 +4519,8 @@ def CMDcomments(parser, args): """Shows or posts review comments for any changelist.""" parser.add_option('-a', '--add-comment', dest='comment', help='comment to add to an issue') + parser.add_option('-p', '--publish', action='store_true', + help='marks CL as ready and sends comment to reviewers') parser.add_option('-i', '--issue', dest='issue', help='review issue id (defaults to current issue). ' 'If given, requires --rietveld or --gerrit') @@ -4547,7 +4549,7 @@ def CMDcomments(parser, args): parser.error('rietveld is not supported') if options.comment: - cl.AddComment(options.comment) + cl.AddComment(options.comment, options.publish) return 0 summary = sorted(cl.GetCommentsSummary(readable=options.readable),