Use change from label value change callback param

Gerrit added change parameter to label value change callback function.
replyApi.addLabelValuesChangedCallback should not be called on each
change, but only once.

This CL calls replyApi.addLabelValuesChangedCallback once on plugin
install and utilizes change provided in the callback paramter.

R=brohlfs@google.com, gavinmak@google.com

Bug: gerrit/15149
Change-Id: I402de9f336c71c2ca7bf265f9a6e0eec294409ed
4 files changed
tree: 15b8ec0e857d21466442327a595451313d94abb1
  1. src/
  2. test/
  3. .eslintrc.json
  4. .gitignore
  5. BUILD
  6. codereview.settings
  7. LICENSE
  8. OWNERS
  9. package-lock.json
  10. package.json
  11. polymer.json
  12. README.md
  13. run-with-prod-data.sh
  14. WATCHLISTS
  15. wct.conf.json
README.md

Chrome/Chromium behavior theme for Gerrit

To run unit tests

$ npm run wct-test

To test with Gerrit FE Dev Helper

Make sure the plugin is installed in plugins/ of Gerrit repository.

$ cd ../.. # Gerrit root directory
$ bazel build plugins/chromium-behavior:chromium-behavior
$ cp -f bazel-bin/plugins/chromium-behavior/chromium-behavior-bundle.js plugins/
$ cd plugins/chromium-behavior
$ run-with-prod-data.sh