Commit 6fba5108 authored by Edward Lesmes's avatar Edward Lesmes Committed by Chromium LUCI CQ

PRESUBMIT: Skip DEPS owners checks when Bot-Commit or Owners-Override is present.

Bug: 1167342
Change-Id: I28b78f16f53c8b997c1d30c53ff9049135be5d56
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2634012Reviewed-by: default avatarDirk Pranke <dpranke@google.com>
Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Cr-Commit-Position: refs/heads/master@{#845011}
parent e8990099
......@@ -2296,6 +2296,18 @@ def CheckAddedDepsHaveTargetApprovals(input_api, output_api):
target file or directory, to avoid layering violations from being
introduced. This check verifies that this happens.
"""
if input_api.change.issue:
# Skip OWNERS check when Bot-Commit label is approved. This label is
# intended for commits made by trusted bots that don't require review nor
# owners approval.
if input_api.gerrit.IsBotCommitApproved(input_api.change.issue):
return []
# Skip OWNERS check when Owners-Override label is approved. This is intended
# for global owners, trusted bots, and on-call sheriffs. Review is still
# required for these changes.
if input_api.gerrit.IsOwnersOverrideApproved(input_api.change.issue):
return []
virtual_depended_on_files = set()
file_filter = lambda f: not input_api.re.match(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment