Use change number as seed for sorting when suggesting code owners for change

For suggesting code owners for paths in changes all requests should use
the same seed so that the sort order is stable across requests and
grouping of files with the same code owners works.

The initial idea was that the frontend generates a seed and then uses
the same seed for all requests that retrieve code owners for the change.
A disadvantage with this would be that the suggested code owners may
change whenever the change screen is reloaded (since reloading would
result in generating a new seed). To avoid this we will simply use the
change number as seed, if no seed was specified. This can be done on
server-side and there is also no need to adapt the frontend.

When listing code owners for a path in a branch we continue to use a
random seed if none was specified.

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