Consider all OWNERS changes as exclusive
I have verified locally that the check will error if you create a commit
that includes both a nested OWNERS file and any other change.
R=jacktfranklin@chromium.org
Fixed: 1029775
Change-Id: Ied7875aeb5b805594dc89107ff5e5a1827bf62e8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3322832
Commit-Queue: Tim Van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 72b55cc..f3a1982 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -75,6 +75,8 @@
return False
def FileIsInDir(file, dirs):
+ if file.endswith('OWNERS') and 'OWNERS' in dirs:
+ return True
for dir in dirs:
if IsParentDir(file, dir):
return True
@@ -89,7 +91,7 @@
'package-lock.json',
input_api.os_path.join('scripts', 'deps', 'manage_node_deps.py'),
],
- ['OWNERS', input_api.os_path.join('config', 'owner')],
+ ['OWNERS'],
]
affected_files = input_api.LocalPaths()