Support to validate the code owner config files in a revision/patch set

This allows to validate the code owner config files in open changes. The
validation is performed from the perspective of the uploader, so that
the validation is exactly the same as the validation that will be done
on submit.

At the moment this REST endpoint doesn't provide much value since code
owner config files are already validated on push and the upload is
rejected if the commit contains invalid code owner config files. So in
practice changes should not contain invalid code owner config files.
However in future we want to allow project owners to switch off the
validation on upload and instead run a bot that does the validation on
the open changes as a pre-submit check. In this case the bot would use
this REST endpoint to do the validation on the open changes.

The REST endpoint also works if the code owners functionality of the
destination branch is disabled. This is consistent with our general
strategy to keep all code owner REST endpoints fully working even if the
code owners functionality is disabled. In addition it also matches the
user expectation. If the user asks us to run the validation for a
particular change/patch set we should just do it, even if the code
owners functionality is disabled for the destination branch.

Signed-off-by: Edwin Kempin <ekempin@google.com>
Change-Id: I010fbc9804bf14a418572234626c5a69e75840f1
14 files changed
tree: 626fe16c1c7a5aafab6ad157a01069c111d0d748
  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