Add distance scores for code owners that are added for resolving all users

If --resolve-all-users is specified when listing code owners code
ownerships that are assigned to all users (aka '*') are resolved to
random users until the limit is reached. For these users no distance
score was added.

After adding random users to fill up the limit, no further code owners
will be included in the result (because the limit is reached). This
means the random users will always have the lowest score. For the
sorting this means that this fix makes no difference (since lowest score
and no score will result in the same sort position). Due to this we
can't test this fix via the sort order. Since we also don't return the
scores to the client, it's hard to test this and hence this change
doesn't include a test.

Signed-off-by: Edwin Kempin <ekempin@google.com>
Change-Id: If579300d1af822c997344ca350a93a220047f2c8
1 file changed
tree: c68b721101ce3c86cd79675388f19f9031d4deb0
  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.