aboutsummaryrefslogtreecommitdiff
path: root/PRESUBMIT.py
diff options
context:
space:
mode:
Diffstat (limited to 'PRESUBMIT.py')
-rw-r--r--PRESUBMIT.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
new file mode 100644
index 000000000..20faecf0d
--- /dev/null
+++ b/PRESUBMIT.py
@@ -0,0 +1,15 @@
+# Copyright (c) 2018, the R8 project authors. Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE file.
+
+def CheckDoNotMerge(input_api, output_api):
+ for l in input_api.change.FullDescriptionText().splitlines():
+ if l.lower().startswith('do not merge'):
+ msg = 'Your cl contains: \'Do not merge\' - this will break WIP bots'
+ return [output_api.PresubmitPromptWarning(msg, [])]
+ return []
+
+def CheckChangeOnUpload(input_api, output_api):
+ results = []
+ results.extend(CheckDoNotMerge(input_api, output_api))
+ return results