GetCodeOwnerStatus: Allow to limit the number of returned statuses

Computing all code owner statuses can be expensive for large changes.

Often callers do not need all code owner statuses, hence it should be
possible to limit the result. E.g. the frontend uses this REST endpoint
to show the code owner statuses in the file list on the change screen,
but for large changes the frontend is not showing all files by default,
hence retrieving all code owner statuses in this case would be wasteful.

By default the change screen is showing at most 200 files and if the
user wants to see more/all files they need to expand the file list. The
frontend can set the limit for code owner statuses to 200 now so that
these 200 files can be covered (renames are reported as a single code
owner status, hence also 200 renames are covered).

The start parameter allows to skip file code owner statuses and can be
used to paginate over the code owner statuses.

When the user expands the file list on the change screen to all files
the frontend can use the start parameter to skip the 200 code owner
statuses that it already has.

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