SuggestReviewer: Support reloaded config

SuggestReviewer will automatically pickup the reloaded config,
however we want to notify the admin that issued the reload, that
these config values has changed and will be picked up.

Change-Id: I879d40b3c10856598726e46dc455d702e008139f
This commit is contained in:
Gustaf Lundh
2018-04-16 10:54:53 +02:00
parent f24e9fe279
commit 25e608fa6e
4 changed files with 51 additions and 0 deletions

View File

@@ -169,6 +169,7 @@ import com.google.gerrit.server.query.change.ChangeData;
import com.google.gerrit.server.query.change.ChangeQueryBuilder;
import com.google.gerrit.server.query.change.ChangeQueryProcessor;
import com.google.gerrit.server.query.change.ConflictsCacheImpl;
import com.google.gerrit.server.restapi.change.SuggestReviewers;
import com.google.gerrit.server.restapi.config.ConfigRestModule;
import com.google.gerrit.server.restapi.group.GroupModule;
import com.google.gerrit.server.rules.DefaultSubmitRule;
@@ -372,6 +373,8 @@ public class GerritGlobalModule extends FactoryModule {
DynamicMap.mapOf(binder(), DownloadCommand.class);
DynamicMap.mapOf(binder(), CloneCommand.class);
DynamicMap.mapOf(binder(), ReviewerSuggestion.class);
DynamicSet.bind(binder(), GerritConfigListener.class)
.toInstance(SuggestReviewers.configListener());
DynamicSet.setOf(binder(), ExternalIncludedIn.class);
DynamicMap.mapOf(binder(), ProjectConfigEntry.class);
DynamicSet.setOf(binder(), PatchSetWebLink.class);