Skip to main content

Slack

The Slack notifier adds support to route messages to Slack using Incoming Webhooks.

Creating a Slack Incoming Webhook

Follow the instructions on the Slack website to create an Incoming Webhook.

Dependency

dependencies {
testImplementation("nl.vanwollingen.alerticorn:alerticorn-slack-notifier:0.1") //To use Slack
}

Shorthand Annotation

@Slack can be used as a shorthand for @Message.Platform("slack")

Example of using @Slack
@Slack
@Message(title = "This would go to Slack")
@Test
fun test() {
//...
}

Configuration

Configure environment variables with AC_SLACK_CHANNEL_<your channel name> to hold the channel webhooks.