From 5eb0519b4c3af94c1093aa81997a7ff99d39e72c Mon Sep 17 00:00:00 2001 From: qyearsley Date: Wed, 26 Oct 2016 08:40:55 -0700 Subject: [PATCH] git cl try: Remove --name option, stop sending "reason" property. When triggering the build, there's a field called "reason", which is currently populated by default with the user's branch name. I have a feeling that this is optional and could be completely omitted. Andrii notes that if users want to send a "reason" string, they could send invoke git cl try with the argument -p reason="". PSA on infra-dev: https://groups.google.com/a/chromium.org/d/msg/infra-announce/PXkM1WinTYY/w2IvN5B4AwAJ BUG=659552 Review-Url: https://codereview.chromium.org/2428383010 --- git_cl.py | 7 ------- tests/git_cl_test.py | 2 -- 2 files changed, 9 deletions(-) diff --git a/git_cl.py b/git_cl.py index 09132a1b5b..27dd8b4ed7 100755 --- a/git_cl.py +++ b/git_cl.py @@ -509,7 +509,6 @@ def _trigger_try_jobs(auth_config, changelist, buckets, options, 'patch_project': project, 'patch_storage': 'rietveld', 'patchset': patchset, - 'reason': options.name, 'rietveld': codereview_url, }, } @@ -4844,9 +4843,6 @@ def CMDtry(parser, args): 'json if decodable, or as string otherwise. ' 'NOTE: using this may make your try job not usable for CQ, ' 'which will then schedule another try job with default properties') - # TODO(tandrii): if this even used? - group.add_option( - '-n', '--name', help='Try job name; default to current branch name') group.add_option( '--buildbucket-host', default='cr-buildbucket.appspot.com', help='Host of buildbucket. The default host is %default.') @@ -4877,9 +4873,6 @@ def CMDtry(parser, args): if error_message: parser.error('Can\'t trigger try jobs: %s' % error_message) - if not options.name: - options.name = cl.GetBranch() - if options.bucket and options.master: parser.error('Only one of --bucket and --master may be used.') diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py index 64b2110836..4b8052178b 100755 --- a/tests/git_cl_test.py +++ b/tests/git_cl_test.py @@ -1950,7 +1950,6 @@ class TestGitCl(TestCase): u'patch_project': u'depot_tools', u'patch_storage': u'rietveld', u'patchset': 20001, - u'reason': u'feature', # This is a branch name, but why? u'rietveld': u'https://codereview.chromium.org', } }) @@ -2004,7 +2003,6 @@ class TestGitCl(TestCase): u'patch_project': u'depot_tools', u'patch_storage': u'rietveld', u'patchset': 20001, - u'reason': u'feature', # This is a branch name, but why? u'rietveld': u'https://codereview.chromium.org', } })