Add issue option to "git cl try"

This patch adds the standard issue option (-i/--issue) to
"git cl try" command.

This is useful for maintaining FlagExpectations with fyi bots.
Runtime-flag features often see new failures, and a good number
of tests are flaky. Maintainers can upload a CL and use cron to
run try jobs to collect multiple tests results to find new
failures and flaky tests.

Change-Id: I069593950023ddae814faf3074c33de4c98cb70e
Reviewed-on: https://chromium-review.googlesource.com/850792
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
changes/92/850792/3
Koji Ishii 7 years ago committed by Commit Bot
parent 1edda746d2
commit 31c14787e4

@ -5593,7 +5593,9 @@ def CMDtry(parser, args):
help='Host of buildbucket. The default host is %default.')
parser.add_option_group(group)
auth.add_auth_options(parser)
_add_codereview_issue_select_options(parser)
options, args = parser.parse_args(args)
_process_codereview_issue_select_options(parser, options)
auth_config = auth.extract_auth_config_from_options(options)
if options.master and options.master.startswith('luci.'):
@ -5607,7 +5609,8 @@ def CMDtry(parser, args):
if args:
parser.error('Unknown arguments: %s' % args)
cl = Changelist(auth_config=auth_config)
cl = Changelist(auth_config=auth_config, issue=options.issue,
codereview=options.forced_codereview)
if not cl.GetIssue():
parser.error('Need to upload first')

Loading…
Cancel
Save