Consider only emails that belong to multiple active accounts as ambiguous

Code owner emails that belong to multiple accounts are detected as
ambiguous and their code ownership is ignored. This is intended however
if an email belongs to multiple accounts and only of them is active,
that's fine as there is exactly one active account to which the code
ownership is assigned.

For CodeOwnerResolver this means that it has to load the accounts, and
check if they are active, before deciding if an email is ambiguous.
Doing this changes, actually improves, the debug logs in case there is
an orphaned email.

Signed-off-by: Edwin Kempin <ekempin@google.com>
Change-Id: I50f06e4e055ee04ac17c8873f0e08c0d6aca4b5e
4 files changed
tree: d594dd13c0f334bd848a28ba89623d2e1d8b2943
  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