Mediawiki Integration for Slack.
- Notifies a Slack channel whenever any page on the wiki is edited.
- MediaWiki >= 1.21
- PHP Curl extension.
-
Log in to your Slack Team and click "Integrations".
-
Select "Incoming WebHooks" as the type.
-
Choose the default channel you want to use and click "Add Integration".
-
Copy the Webhook URL shown on the left of the page. We'll need this in step 6.
-
Copy the contents of the Slack folder in this repository to your wiki's extensions folder.
-
Add the following lines to LocalSettings.php
# Enable the Slack extension require_once "$IP/extensions/Slack/Slack.php"; # Slack extension configuration options $wgSlackWebhookURL = "THE INTEGRATION URL FROM STEP 4"; $wgSlackUserName = "THE USERNAME YOU WANT YOUR BOT TO HAVE IN SLACK"; $wgSlackChannel = "#theChannelForBotMessagesToAppearIn";
-
Edit a wiki page, and see the message pop up in Slack.
The optional features that you can enable and configure are listed below.
This feature links the wiki user name to the equivalent Slack user in Slack messages. Enable it by adding the following line to LocalSettings.php:
$wgSlackLinkUsers = true;
Note that wiki usernames are converted to Lower Case before being passed to Slack. However, Slack's user name linking feature is case sensitive, so if your Slack user name contains capitals, it won't find you.
Pull requests for new features are welcome. There's lots more I'd like to make this integration do, but I don't have the time, and it already covers my main requirement.