Skip to content
Permalink
Browse files
notify: rename SlackUpdater to SlackNotifier
Reviewed-by: rwestberg
  • Loading branch information
edvbld committed Jun 10, 2020
1 parent 2ff9a38 commit d88ec4d793f562874f77dc2476364710e499bdd7
@@ -39,5 +39,5 @@
org.openjdk.skara.bots.notify.issue.IssueUpdaterFactory,
org.openjdk.skara.bots.notify.json.JsonNotifierFactory,
org.openjdk.skara.bots.notify.mailinglist.MailingListNotifierFactory,
org.openjdk.skara.bots.notify.slack.SlackUpdaterFactory;
org.openjdk.skara.bots.notify.slack.SlackNotifierFactory;
}
@@ -35,12 +35,12 @@
import java.util.List;
import java.time.format.DateTimeFormatter;

public class SlackUpdater implements RepositoryUpdateConsumer, PullRequestUpdateConsumer {
class SlackNotifier implements RepositoryUpdateConsumer, PullRequestUpdateConsumer {
private final RestRequest prWebhook;
private final RestRequest commitWebhook;
private final String username;

public SlackUpdater(URI prWebhook, URI commitWebhook, String username) {
SlackNotifier(URI prWebhook, URI commitWebhook, String username) {
this.prWebhook = prWebhook != null ? new RestRequest(prWebhook) : null;
this.commitWebhook = commitWebhook != null ? new RestRequest(commitWebhook) : null;
this.username = username;
@@ -29,7 +29,7 @@

import java.net.URI;

public class SlackUpdaterFactory implements NotifierFactory {
public class SlackNotifierFactory implements NotifierFactory {
@Override
public String name() {
return "slack";
@@ -46,7 +46,6 @@ public Notifier create(BotConfiguration botConfiguration, JSONObject notifierCon
commitWebhook = URIBuilder.base(notifierConfiguration.get("commit").asString()).build();
}
var username = notifierConfiguration.get("username").asString();
var updater = new SlackUpdater(prWebhook, commitWebhook, username);
return updater;
return new SlackNotifier(prWebhook, commitWebhook, username);
}
}

0 comments on commit d88ec4d

Please sign in to comment.