Use effectiveAvatarEmail() for avatar lookup

Support the new avatarEmail account field which allows users to
select which email address is used for Gravatar lookup, independent
of their preferred email for communication.

This change uses Account.effectiveAvatarEmail() which returns
avatarEmail if set, otherwise falls back to preferredEmail.

Depends-On: I045c075b1bbd7ee7eabb1a144d9b577e907daf5f
Change-Id: I5b977389b1088bf5c3f36a92784794be5971196d
1 file changed
tree: ddd0df81fd9ef17783babe52330f0afb0eac138e
  1. .settings/
  2. src/
  3. .gitignore
  4. BUILD
  5. README.md
README.md

Gerrit Gravatar plugin

This plugin populates Gerrit users' avatar images from the popular Gravatar platform using the MD5 code of the user's preferred email.

How to build

Clone or link this plugin to the plugins directory of Gerrit‘s source tree, and then run bazel build on the plugin’s directory.

Example:

git clone --recursive https://gerrit.googlesource.com/gerrit
cd plugins
git clone "https://gerrit.googlesource.com/modules/avatars-gravatar"
cd .. && bazelisk build plugins/avatars-gravatar

The output plugin jar is created in bazel-bin/plugins/avatars-gravatar/avatars-gravatar.jar

How to install

Copy the avatars-gravatar.jar into the ${GERRIT_SITE}/plugins/ and start Gerrit Code Review.

Configuration

The plugin configuration is read from $GERRIT_SITE/etc/gerrit.config, see the config.md documentation for more details on the individual settings.