# Cherry-pick Status Viewer Plugin for Gerrit
A Gerrit plugin that provides web UI and REST API for fetching updated statuses of cherry-picks.
## Features
- Web UI Features:
- Filtering of changes based on repo name, original change owner
- Additional filtering options to exclude results which contain blocker changes in ABANDONED.
- Each created change links to the change in gerrit.
- Finds tqtc-hidden changes even if the source change started in public repos and branches.
- Security:
- Uses Gerrit's internal user-based repo filtering to prevent unauthorized viewing.
- Uses Gerrit's internal user-based accounts filtering to reject filtering on a user the viewing user cannot see.
- Suggestions for both repo and user filters based on user-visible data provided by gerrit.
- Anonymous access allowed, showing only publicly visible projects and changes.
- Server-authenticated Database access performed by plugin backend.
- API Support:
- REST endpoint authenticated with user session, REST authentication, or anonymous access.
Installation
-
Build the plugin: Requires building in-tree with Gerrit.
bazelisk build plugins/gerrit-plugin-cherrypickstatus
-
Deploy to Gerrit:
- Copy
target/gerrit-plugin-cherrypickstatus.jar
toreview_site/plugins/gerrit-plugin-cherrypickstatus
- Copy
Testing:
bazel test //plugins/gerrit-plugin-cherrypickstatus:tests
Configuration
- Configure
/review_site/etc/gerrit-plugin-cherrypickstatus.config
using the included example. - Change of plugin configuration may require a full gerrit restart if
gerrit plugin reload
does not work.
Usage
- Navigate to
/x/gerrit-plugin-cherrypickstatus/cherrypick
:- Select "Cherry Pick Status" from the top menu
- Select "View Status"
API Documentation
Get Configuration
GET /config/server/getdashboard
Parameters:
- owner: Optional, email address.
- repo: Optional, string. Do not use URI Encoding. If omitted, returns all visible repos.
- onlyStuck: Optional, bool. Returns only changes with cherry-picks in problematic statuses
- exclAbandon: Optional, bool. Requires combination with
onlyStuck
. Excludes changes where the only outstanding branches are abandoned, or depend on an abandoned change.
Response application/json
:
{
totalPages: int,
changes: [
{
subject: str,
repo: str,
owner_email: str,
merged_dt: date,
branches: [{
status: str,
depends_on: str,
last_date: optional date,
url: optional str
}]
}
]
}