Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(935)

Unified Diff: git_cl.py

Issue 348933002: Show an error message when the user tries to set the commit flag or add trybots to a private issue. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: added check for private issues to gcl.py for try jobs Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gcl.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_cl.py
diff --git a/git_cl.py b/git_cl.py
index 6a43b3d051e092173255fb74e14bca2472f3975f..f86a781765a4ab605459d63fbc8628a77f268dae 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -2267,6 +2267,10 @@ def CMDtry(parser, args):
if not cl.GetIssue():
parser.error('Need to upload first')
+ props = cl.GetIssueProperties()
+ if props.get('private'):
+ parser.error('Cannot use trybots with private issue')
+
if not options.name:
options.name = cl.GetBranch()
@@ -2412,6 +2416,9 @@ def CMDset_commit(parser, args):
if args:
parser.error('Unrecognized args: %s' % ' '.join(args))
cl = Changelist()
+ props = cl.GetIssueProperties()
+ if props.get('private'):
+ parser.error('Cannot set commit on private issue')
cl.SetFlag('commit', '1')
return 0
« no previous file with comments | « gcl.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698