About

A Slack integration for Swarm.

Change Activity in a Swarm Project in send to a specified Slack channel.
  • 2
    Members
  • 7
    Followers
  • 1
    Branch
Owners
pallen (pallen)paul_allen (Paul Allen)
Members
dale_sumbler (Dale Sumbler)paul_allen (Paul Allen)
Followers
bheather (bheather)chunglam (chunglam)liz_lam (Liz Lam)ltyphair (ltyphair)p4pzp (p4pzp)
thomas_gray (Thomas Gray)tommyjd (tommyjd)
Branches
  • Main

Slack Swarm module

A simple Swarm module that monitors the Project's Activity feed for changes. Changes are sent to the Slack channel specified in the Project's configuration page.

Add Integration

The hyperlinks will take you directly to the Change or user specs in Swarm.

Installation

Swarm 2015.4 is required (the Slack module needs data-access to the Project's configuration).

The Slack module consists of 4 four files...

module/Slack/config/module.config.php
module/Slack/Module.php
module/Slack/src/Slack/Message.php
public/module/Slack/js/Slack.js
  1. Copy the module directory module/Slack into your Swarm's module/... installation directory.

    Typically /opt/swarm/module/...

  2. Copy the remainding file Slack.js into your Swarm's public folder keeping the directory structure module/Slack/js/.

    A typical install destination: /opt/swarm/public/module/Slack/js/Slack.js

  3. Restart your Swarm web service and the you should be ready to use the Slack integration.

Setup

For the Swarm project to talk to Slack you need to add an Incoming Webhook. Open Slack and access the options menu for the channel you want to add the integration. Then select 'Add a service integration ...'

Add Integration

Click on the 'Build your own' button and choose 'Make a Custom Integration', then choose the 'Incoming Webhook' from the list.

Add Incoming Webhook

Find the channel from the list...

Find Channel

then click to add..

Add Add Hook

Copy the Webhook URL

Add Add Hook

and add the Webhook URL to the 'Slack Webhook' box on your Swarm Project's configuration page.

Add Add Hook

'Save' and you are done.

Configuration

The configuration of the module is located in: module/Slack/config/module.config.php you can see the default here.

'slack' => array(
    'user'        => 'Swarm',
    'icon'        => 'https://pbs.twimg.com/profile_images/572920496824406016/Io8m39jD.jpeg',
    'max_length'  => 80
)

The fields are user the name of the Swarm Slack BOT shown in the chat feed. An external URL for icon used for the Slack BOT icon and max_length the number of characters to show from the Change description (default 80 characters).