Add a has:enabled_code-owners and has:approval_code-owners operands

Adding two operands to the 'has' predicate:
  * has:enabled_code-owners
  * has:approval_code-owners

The CodeOwnerApprovalPredicate wraps the existing CodeOwnerSubmitRule
logic. The predicate returns true only if the submit rule returns a
record with status = "OK". We will need this predicate to create query
expressions that depend on code owner approvals in submit requirements.

The two new operators work only for submit requirement expressions and
are not supported in search queries.

Bug: Google b/200665812
Change-Id: I391a0d7fd43528c87ff9dfc7ca981c7dc4d05407
8 files changed
tree: b04629d4ecea2791b6e6bec126cee4e05ddf3c0a
  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.