PathCodeOwners: Skip resolving global imports that will be ignored

If the code owner config that is being resolved has any matching
per-file rule that ignores parent and global code owners we can skip
resolving global imports with import mode GLOBAL_CODE_OWNER_SETS_ONLY as
they only import global code owners that we already know will be
ignored.

The newly added test covers a case that would be failing if we would
skip all global imports if the code owner config that is being resolved
has any matching per-file rule that ignores parent and global code
owners (rather than just skipping global imports with import mode
GLOBAL_CODE_OWNER_SETS_ONLY).

Signed-off-by: Edwin Kempin <ekempin@google.com>
Change-Id: Icbdd7571da5ac017489f382e870a45f747a9e9b2
2 files changed
tree: 8c922c43b671452a8be045a9ebf7ee2d052d4b02
  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.