diff options
author | Yu-Ping Wu <yupingso@chromium.org> | 2023-01-05 11:34:19 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-03-29 08:18:41 +0000 |
commit | 375b831e88d847f0e392cac161a57f0ef0134adc (patch) | |
tree | 73c79529e1ef6eaf3419acc986bb6b5205702555 | |
parent | 64baefdf145c6f9976af8cffe028745ef39b2568 (diff) | |
download | vboot-375b831e88d847f0e392cac161a57f0ef0134adc.tar.gz |
Add PRESUBMIT.py
Add PRESUBMIT.py to prevent people from uploading CLs using `git cl`.
BUG=none
TEST=`git cl upload` failed
BRANCH=none
Change-Id: I1906614093c6135dff1279393e3d79172f41a3c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4133838
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4380950
Commit-Queue: Cheng Yueh <cyueh@chromium.org>
Reviewed-by: Cheng Yueh <cyueh@chromium.org>
Tested-by: Phoebe Wang <phoebewang@chromium.org>
Auto-Submit: Phoebe Wang <phoebewang@chromium.org>
-rw-r--r-- | PRESUBMIT.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py new file mode 100644 index 00000000..64abb3cf --- /dev/null +++ b/PRESUBMIT.py @@ -0,0 +1,17 @@ +# Copyright 2023 The ChromiumOS Authors +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +"""Hook to stop people from running `git cl`.""" + +import sys + +USE_PYTHON3 = True + + +def CheckChangeOnUpload(_input_api, _output_api): + print( + "ERROR: CrOS repos use `repo upload`, not `git cl upload`.\n" + "See https://chromium.googlesource.com/chromiumos/docs/+/HEAD/contributing.md#upload-changes.", + file=sys.stderr, + ) + sys.exit(1) |