CodeOwnerResolverResult: Include flag if there are unresolved code owners

Android wants a configuration option to make all users code owners of
paths for which no code owners are defined:

1. if for a path no code owners are defined, the path is owned by all
   users
2. if for a path code owners are defined, only these users own the path
3. if for a path code owners are defined, but none of them is resolvable
   the path is owned by no one and changes require an override for
   submission

As a first step for adding such a configuration option we extend
CodeOwnerResolverResult with a flag that is set if there are unresolved
code owners. This allows callers to differentiate the cases above:

1. codeOwners is empty, ownedByAllUsers = false,
   hasUnresolvedCodeOwners = false
2. codeOwner is non-empty or ownedByAllUsers = true
3. codeOwners is empty, ownedByAllUsers = false,
   hasUnresolvedCodeOwners = true

Signed-off-by: Edwin Kempin <ekempin@google.com>
Change-Id: Iab1abf7a139dcead9e8ccad55b989a00d53ff8fc
3 files changed
tree: b185fd8ce3e7f99e9e208674a3b75ae593efa7f0
  1. java/
  2. javatests/
  3. proto/
  4. resources/
  5. test/
  6. ui/
  7. .eslintrc.json
  8. .gitignore
  9. .gitreview
  10. bower.json
  11. BUILD
  12. LICENSE
  13. package-lock.json
  14. package.json
  15. README.md
README.md

Gerrit Code Review code-owners plugin

This plugin provides support for defining code owners for files in a repository.

If the code-owners plugin is enabled, changes can only be submitted if all touched files are covered by approvals from code owners.

Also see resources/Documentation/about.md

IMPORTANT: Before installing/enabling the plugin follow the instructions from the setup guide, see resources/Documentation/setup-guide.md