Skip to content
A triage bot example for Slack
Branch: master
Clone or download
John Agan
John Agan Merge pull request #8 from colmdoyle/master
Add support for DE locale
Latest commit 988498a Apr 25, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
locales Add support for DE locale Apr 24, 2018
.gitignore initial commit Nov 6, 2016
LICENSE Create LICENSE Apr 3, 2017
README.md Update readme Apr 11, 2018
app.json added heroku app.json Nov 7, 2016
index.js Update readme Apr 11, 2018
package-lock.json Initial i18n work Apr 11, 2018
package.json Initial i18n work Apr 11, 2018
settings.json Final i18n prep Apr 11, 2018
triage.js Final i18n prep Apr 11, 2018

README.md

What is a Triage Bot?                                                                                            Deploy

After triggering this bot through a slash command, it will scan the last 1000 messages in the current channel and look for messages that contain certain emojis [configurable] in the text (not reactions). These messages will be grouped into statuses and reported to the user.

Statuses

  • Pending - Messages pending review
  • Review - Messages that are in review
  • Addressed - Messages that have been addressed

Requirements

Usage

Environment Variables

  • TOKEN - The Slack token
  • PORT - The webserver port
  • LOCALE - The preferred locale. Defaults to en

Starting

TOKEN=xoxp-XXXXXXXXXX PORT=3000 LOCALE=pirate npm start

Contents

  • index.js - A very basic webserver and http client to post back to Slack
  • triage.js - The main functionality lies here. Pass in the Slash command payload, the channel history, and optionally any settings overrides. You'll get a formatted Slack message with the results.

API

let message = triage(
  payload,    // The payload from the Slack slash command
  messages,   // An array of slack messages to triage
  settings    // Any settings overrides to apply [optional]
);

Settings

You can adjust the messages, emoji, and reactjis by updates the settings.json file or passing in any overrides you'd like to the main function.

triage(payload, messages, {
  display: [ "pending", "review" ]
});

Private Response

triage-private

Public Response

triage-public

Existing Apps

Already have an app and just want the Triage builder? No problem, you could require this package or copy the contents from triage.js.

You can’t perform that action at this time.