Do not send combined check state updated emails for non-current patch sets

Users are only interested in the combined check state of the current
patch set.

In addition the computation of the combined check state on non-current
patch sets is not accurate because backfilling of checks is only done
for the current patch set. The reason for this is that the checker query
system currently cannot check if a checker is relevant for a non-current
patch set (see comment in
CheckBackfiller#getBackfilledChecksForRelevantCheckers).

On gerrit-review this led to unexpected email contents:
1. On gerrit-review we have 2 optional checkers: "Build/Tests" and
   "Code Style"
2. If a successful check for "Code-Style" is posted on a non-current
   patch set, we got an email saying that the combined check state was
   updated to SUCCESSFUL, but the combined check state is expected to be
   IN_PROGRESS since no check for "Build/Tests" was posted yet. That's
   because no backfilling is done for "Build/Tests". That's also the
   reason why "Build/Tests" is missing in the checks overview of the
   email.

If emails are only sent for the current patch set, the issue with the
wrong email contents is no longer occurring.

Signed-off-by: Edwin Kempin <ekempin@google.com>
Change-Id: Ia15feb64762fbaa7c500529a7746246ae6c0e089
2 files changed
tree: 97f9e04354cb01cefc5177eeb1f00ac8ee53c10f
  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.