Listen to change events instead of listening to ref updates

At the moment the plugin is listening to all ref-updated events. It
then filters for 'refs/changes/*' refs and parses the change and patch
set information out of the ref name in order to add the reviewers for
this change/patch set.

This works fine except when Gerrit sends the ref-updated event before
the new patch set is created in the database (see issue 2181). Because
of this the plugin cannot add reviewers when a change is rebased in
the WebUI or if modifications to the access rights are saved for
review.

Change the plugin to listen to change events instead of listening to
ref-updated events since for the change events is it ensured that they
are only fired after the patch set and change have been created in the
database.

Saving modifications to the access rights for review is currently not
triggering a change event, but this is fixed by [1].

[1] https://gerrit-review.googlesource.com/51282

Bug: issue 2181
Change-Id: Ib971f5aa2ae5fc19141f1680b1292efa2757bbf8
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2 files changed
tree: 3248c3d10e17f2e349042b1eb1d65486146a15d8
  1. .gitignore
  2. .settings/
  3. LICENSE
  4. pom.xml
  5. src/