Rico Wind | 62d0320 | 2018-11-30 13:43:49 +0100 | [diff] [blame] | 1 | # Copyright (c) 2018, the R8 project authors. Please see the AUTHORS file |
| 2 | # for details. All rights reserved. Use of this source code is governed by a |
| 3 | # BSD-style license that can be found in the LICENSE file. |
| 4 | |
| 5 | def CheckDoNotMerge(input_api, output_api): |
| 6 | for l in input_api.change.FullDescriptionText().splitlines(): |
| 7 | if l.lower().startswith('do not merge'): |
| 8 | msg = 'Your cl contains: \'Do not merge\' - this will break WIP bots' |
| 9 | return [output_api.PresubmitPromptWarning(msg, [])] |
| 10 | return [] |
| 11 | |
| 12 | def CheckChangeOnUpload(input_api, output_api): |
| 13 | results = [] |
| 14 | results.extend(CheckDoNotMerge(input_api, output_api)) |
| 15 | return results |