gerrit/Documentation/pg-plugin-change-metadata-api.txt
Viktar Donich b6db19e072 Plugin API for label score updates
Plugin may use following API to receive saved label updates:

``` js
plugin.changeMetadata().onLabelsChanged(
    labels => console.log(labels));
```

Feature: Issue 820117
Change-Id: Id428606db25086cfdf5a5b420e34777cc8b27303
2018-04-06 15:24:56 -07:00

17 lines
557 B
Plaintext

= Gerrit Code Review - Change metadata plugin API
This API is provided by
link:pg-plugin-dev.html#change-metadata[plugin.changeMetadata()] and provides
interface for customization and data updates of change metadata.
== onLabelsChanged
`changeMetadataApi.onLabelsChanged(callback)`
.Params
- *callback* function that's executed when labels changed on the server.
Callback receives labels with scores applied to the change, map of the label
names to link:rest-api-changes.html#label-info[LabelInfo] entries
.Returns
- `GrChangeMetadataApi` for chaining.