commit | b275c983af3d5e2b33d29638a113eb5823b8b313 | [log] [tgz] |
---|---|---|
author | Taylor Santiago <taylorsantiago@google.com> | Sun Sep 01 20:24:28 2024 -0700 |
committer | Taylor Santiago <taylorsantiago@google.com> | Tue Sep 03 16:34:05 2024 +0000 |
tree | 4fb34d6a63cc155b75f6b1800ab8ffc66e9406f3 | |
parent | d7027752887e902cbce3132ab115859b089a6899 [diff] |
Capture CurrentUser in event listeners to use in ExecutorService threads. The event listeners receive the correct Current User from the Provider, while the event listener implementations ran in a separate ExecutorService thread may receive Anonymous User from the Provider. This matches how other plugins, such as code-owners, propagate the AccountId from the event listener to worker threads. e.g. https://gerrit.googlesource.com/plugins/code-owners/+/a7f6a238d73568d5bb1cbd1f6f4a22668b0da5cc/java/com/google/gerrit/plugins/codeowners/backend/OnCodeOwnerApproval.java#200 Change-Id: Ifcafb297cdc1e48b78d3c0ece3677bb3847775f6
See src/main/resources/documentation.
For running unit tests execute:
bazel test --test_output=all //plugins/automerger/web:karma_test
For checking or fixing eslint formatter problems run:
bazel test //plugins/automerger/web:lint_test bazel run //plugins/automerger/web:lint_bin -- --fix "$(pwd)/plugins/automerger/web"
For testing the plugin with Gerrit FE Dev Helper build the JavaScript bundle and copy it to the plugins/
folder:
bazel build //plugins/automerger/web:automerger cp -f bazel-bin/plugins/automerger/web/automerger.js plugins/
and let the Dev Helper redirect from .+/plugins/automerger/static/automerger.js
to http://localhost:8081/plugins_/automerger.js
.