Add support for a global status files for OWNERS
This allows for having some global comments such as timezones or
long-term unavailability.
The comments go into build/OWNERS.status (that way, they should be
available in all repos that map in build/ for the gn config files).
The local can be overwritten in codereview.settings.
The format is
email: status
Comments (starting with #) are allowed in that file, but they're ignored.
BUG=694222
R=dpranke@chromium.org
Change-Id: I49f58be87497d1ccaaa74f0a2f3d373403be44e7
Reviewed-on: https://chromium-review.googlesource.com/459542
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
diff --git a/git_cl.py b/git_cl.py
index d65ef68..f8c536a 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -3244,7 +3244,8 @@
reviewers.append(name)
if add_owners_tbr:
owners_db = owners.Database(change.RepositoryRoot(),
- fopen=file, os_path=os.path)
+ change.GetOwnersStatusFile(),
+ fopen=file, os_path=os.path)
all_reviewers = set(tbr_names + reviewers)
missing_files = owners_db.files_not_covered_by(change.LocalPaths(),
all_reviewers)
@@ -3463,6 +3464,9 @@
SetProperty('run-post-upload-hook', 'RUN_POST_UPLOAD_HOOK',
unset_error_ok=True)
+ if 'OWNERS_STATUS_FILE' in keyvals:
+ SetProperty('owners-status-file', 'OWNERS_STATUS_FILE', unset_error_ok=True)
+
if 'GERRIT_HOST' in keyvals:
RunGit(['config', 'gerrit.host', keyvals['GERRIT_HOST']])
@@ -5512,8 +5516,9 @@
return owners_finder.OwnersFinder(
[f.LocalPath() for f in
cl.GetChange(base_branch, None).AffectedFiles()],
- change.RepositoryRoot(), author,
- fopen=file, os_path=os.path,
+ change.RepositoryRoot(),
+ change.GetOwnersStatusFile(),
+ author, fopen=file, os_path=os.path,
disable_color=options.no_color).run()