CodeOwnerApprovalCheck: Allow to check for an account which paths it owns

When a code owner votes on the code owner label, we want to write a
change message that lists the files/paths that were approved by the user
by applying the vote. To write this message we need to know which of the
files/paths in the change are owned by the user. Instead of
reimplementing logic for this, we extend CodeOwnerApprovalCheck so that
it can compute the code owner statuses for all files/paths of a change
assuming that there is only an approval of a given user. Any file/path
that gets approved by this approval is owned by the user. Making use of
the new getFileStatusesForAccount method in CodeOwnerApprovalCheck to
write the change message on post review will be implemented by a
follow-up change.

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