Add REST endpoint to get the code owner configuration for a branch

Before the frontend can display any code owner controls on the change
screen it needs to know whether the code owners functionality is enabled
for the destination branch of the change. To find out about this the
frontend currently calls the Get Code Owner Project Config REST
endpoint. The problem is that this REST endpoint returns the code owner
configuration for all branches that exist in the repository and if there
are many branches it gets slow (e.g. > 3s for projects with hundreds of
branches). This latency is too high for the frontend, however the
frontend is only interested in the code owner config of a single branch,
hence we now offer a REST endpoint to get the code owner configuration
for a branch. This REST endpoint is faster, as it doesn't need to
iterate over all branches that exist in the repository, but only needs
to return the config for that one branch.

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