Allow to configure the path expression syntax that should be used

The code-owners plugin already supports several syntaxes for path
expressions: simple path expressions, globs, and find-owners compatible
globs

Which path expressions syntax was used was derived from the configured
code owner backend: find-owners backend -> find-owners compatible globs,
proto backend -> simple path expressions

With this change it is now possible to override the default path
expression syntax that is derived from the code owners backend by
configuration.

New configuration parameters allow to configure the path expression
syntax by project and branch (similar to how the code owner backend can
be configured by project and branch).

Switching to a different path expression syntax e.g. may be desirable
when using the find-owners backend, as many users find that find-owners
compatible globs behave unexpected (see caveats section on the
path-expressions.md page) and would prefer pure glob matching.

When switching the path expressions syntax one has to be careful as this
change affects how path expressions in existing code owner config files
are interpreted. E.g. by changing the path expression syntax existing
path expressions may now match different files, or even worse the
existing path expressions may no longer be valid and fail to parse, in
which case they would not match anything any more.

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