1# Copyright 2018 the V8 project authors. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5"""Presubmit script for changes in the infrastructure configs. 6 7See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts 8for more details about the presubmit API built into gcl. 9""" 10 11 12def _CommonChecks(input_api, output_api): 13 """Checks common to both upload and commit.""" 14 results = [] 15 results.extend( 16 input_api.canned_checks.CheckChangedLUCIConfigs(input_api, output_api)) 17 return results 18 19 20def CheckChangeOnUpload(input_api, output_api): 21 results = [] 22 results.extend(_CommonChecks(input_api, output_api)) 23 return results 24 25 26def CheckChangeOnCommit(input_api, output_api): 27 results = [] 28 results.extend(_CommonChecks(input_api, output_api)) 29 return results 30