commit | 3e06c6edf24b1f61c691d8cc7365017666bf0a8a | [log] [tgz] |
---|---|---|
author | Edwin Kempin <ekempin@google.com> | Tue Mar 15 12:32:07 2022 |
committer | Edwin Kempin <ekempin@google.com> | Tue Mar 15 12:32:07 2022 |
tree | 2ce675cb2075cac16be34b3da94b8bac9b15af53 | |
parent | 0c7f4af46515f2b12631122649bd39780943e3b2 [diff] |
Use Flogger for writing logs Using Flogger for logging is consistent with Gerrit core. Also Flogger has a fluent API that is less error-prone and easier to read. Signed-off-by: Edwin Kempin <ekempin@google.com> Change-Id: Ie17ce70c55f0b26a1207e22d44634fb546071d39
This plugin must be placed inside the Gerrit plugins directory:
git clone --recurse-submodules https://gerrit.googlesource.com/gerrit cd gerrit/plugins git clone https://chromium.googlesource.com/infra/gerrit-plugins/landingwidget
For running unit tests execute:
bazel test --test_output=all //plugins/landingwidget/web:karma_test
For checking or fixing eslint formatter problems run:
bazel test //plugins/landingwidget/web:lint_test bazel run //plugins/landingwidget/web:lint_bin -- --fix "$(pwd)/plugins/landingwidget/web"
For testing the plugin with Gerrit FE Dev Helper build the JavaScript bundle and copy it to the plugins/landingwidget
folder:
bazel build //plugins/landingwidget/web:landingwidget cp -f bazel-bin/plugins/landingwidget/web/landingwidget.js plugins/landingwidget
and let the Dev Helper redirect from .+/plugins/landingwidget/static/landingwidget.js
to http://localhost:8081/plugins_/plugins/landingwidget.js
.
Note for local testing: this plugin fetches from an external site which may be blocked by CORS policy.