Fix: this.codeOwnersCacheApi.getStatus is not a function

The code-owners plugin requests owners status for the latest patchset.
Usually, the patchset in the response matches the latest patchset
known to the Gerrit itself. However, there are 2 rare cases:

1. A new patchset is uploaded right after the gerrit loads change info,
but before the plugin requests owners status

2. A new patchset has been uploaded, but owners plugin receives
status for a previous patchset.

Before the fix, Gerrit was tried to request owner status again and
failed due to the bug in the code.

With this fix, the behavior is changed:
- In the 1st case, the plugin notifies a user about a newer patchset
and doesn't show status information until user reloads a change
- In the 2nd case, the plugin retries status request again and again
until the status for the newer patchset is recevied.

Change-Id: I9971ce76f6ffcfccfcfa69d791c92a0e24a0f1c8
3 files changed
tree: ffdd9bc005a4384a7857d8e7336e7697819754f3
  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.