Stop resolving all users by default when listing code owners

The "resolve-all-users" option on the list code owners REST endpoints
resolves "*" to random users until the requested limit is reached. So
far this was the default behaviour. Since we are returning a flag that
tells the caller whether the file is owned by all users (see change
I8c564c959), callers can handle this case explicitly now and resolving
"*" to random users is not longer required in most cases. Hence we are
flipping the default for this option to "false".

There are still some cases were the old behaviour is wanted (e.g. if a
tool wants to automatically assign reviews to a code owner), which is
why we still support this option.

Another reason to flip the default is that Gerrit core actually doesn't
properly support boolean options that are true by default so that this
option is currently broken (it cannot be set to false since Gerrit core
does not forward false values to the REST endpoint, because it assumes
that false is the default value for all boolean options). By flipping
the default we avoid this problem (but it's not the main reason why we
are flipping the default).

Known callers (Android AyeAye and the Gerrit UI) have been adapted to
explicitly set "resolve-all-users=true" so that they are not affected by
the flip of the default value. The Gerrit UI intends to use
"resolve-all-users=false", but it still requires some work (so setting
"resolve-all-users=true" in the Gerrit UI is only temporarily).

Bug: Issue 14120
Signed-off-by: Edwin Kempin <ekempin@google.com>
Change-Id: Ic887a27feab2935f8fcd97c221fa012876cb5e18
3 files changed
tree: 6fe5ef47578b7444d61371b841c8515d6124af20
  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.