Add skeleton for list pending checks REST endpoint

This adds a skeleton for the REST endpoint that allows listing pending
checks. The actual implementation of the REST endpoint will be done in a
follow-up change.

This change adds:
- the boilerplate code for the new REST endpoint
- the boilerplate code for the new extension API
- a REST bindings test for the new REST endpoint
- an integration test for the new REST endpoint
- the input options of the new REST endpoint
- the definition of the JSON output
- the REST endpoint documentation

The new REST endpoint to list pending checks is exposed under:
GET /plugins/checks/checks.pending

As input a checker UUID or a checker scheme must be specified as request
parameter. If a checker scheme is specified pending checks for all
checkers with that scheme are returned.

Optionally one or multiple check states can be specified as request
parameter to define which states are considered as pending. If not
specified it's assumed that only checks in state NOT_STARTED should be
returned.

The pending checks are returned as PendingChecksInfo which has the
following fields:
- patchSet: Patch set for which checks are pending. This entity contains
  fields for the project, the change number and the patch set ID
  (further fields may be added later on need)
- pendingChecks: The pending checks on the patch set as map of checker
  UUID to PendingCheckInfo. This is a map because if a scheme is
  specified pending checks for multiple checkers may need to be
  returned.

The PendingCheckInfo has only one field with the check state. It's a
seperate entity so that we can easily add further fields in the future.
The check state must be returned because it's possible to specify
multiple check states as input and callers want to know which pending
check has which state.

Signed-off-by: Edwin Kempin <ekempin@google.com>
Change-Id: I2d1688e2557d52a2d4c7057fc169dde64ed26ce4
18 files changed
tree: f34386e483039f739ee1959d8e5fd5936ca81138
  1. java/
  2. javatests/
  3. src/
  4. BUILD
  5. LICENSE
  6. 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.