Send email notification if combined check state is updated

When the combined check state of a patch set changes by
creating/updating a check we now send an email notification to the
change owner, the reviewer, users who starred the change and project
watchers.

We only send a notification when the combined check state changes
because sending a notification each time a check is created or updated
would result in too many emails and we don't want to spam users.

To handle the sending of the email notifications we introduce a new
layer for updating checks that is in between the REST layer and the
storage layer. This way we neither need to reimplement sending email
notifications for all REST callers nor for all storage backends. The
new ChecksUpdate layer delegates the persistence of checks to the checks
storage backend and implements business logic (such a s sending emails)
that is the same for all storage backends. The interface for the
storage layer was renamed from ChecksUpdate to ChecksStorageUpdate (to
free up the ChecksUpdate name for the new layer).

Signed-off-by: Edwin Kempin <ekempin@google.com>
Change-Id: Ibb5cd800b786f6754fcf4f3f28f26c2cad7ded94
13 files changed
tree: f4cad5ca6391db30db1639c7ccb7a4c992061815
  1. gr-checks/
  2. java/
  3. javatests/
  4. proto/
  5. resources/
  6. test/
  7. .gitignore
  8. bower.json
  9. BUILD
  10. LICENSE
  11. README.md
README.md

Gerrit Code Review Checks Plugin

This plugin provides a unified experience for checkers (CI systems, static analyzers, etc.) to integrate with Gerrit Code Review.

This plugin uses polymer-cli to test.

After bower install, running polymer test -l chrome will run all tests in Chrome, and running polymer serve and navigating to http://127.0.0.1:8081/components/checks/gr-checks/gr-checks-view_test.html allows for manual debugging.