Coder Social home page Coder Social logo

dfe-digital / slack-incident-bot Goto Github PK

View Code? Open in Web Editor NEW
7.0 23.0 2.0 243 KB

A Slack app used for incident management at Department for Education Digital

License: MIT License

Ruby 94.84% HTML 2.20% JavaScript 2.89% Procfile 0.06%
slack bot ruby rails incident-management incident-response incident slack-bot ruby-on-rails incident-response-tooling incident-handling slack-api slack-commands

slack-incident-bot's Introduction

DfE Incident Bot ๐Ÿค–

Incident management.. all within Slack โ€“ /incident

Local Setup

  1. Request an invite to the Slack Bot Testing Grounds workspace & a copy of the secrets for your .env file
  2. Visit https://api.slack.com/apps and select DfE incident bot (test)
  3. Spin up a ngrok tunnel with ngrok http 3000 and take a copy of the forwarding URL
  4. Navigate to Interactivity & Shortcuts and add the following URL to Request URL:
  1. Navigate to Slash Commands and add the following URL to the four slash commands:
  1. Navigate to OAuth & Permissions and add the following URL to Redirect URLS:
  1. Update your .env file with the following URLs:
  • BASE_URL=https://example.ngrok.io
  • ENV_URL=example.ngrok.io
  1. Launch your rails server and test the connection in Slack with /ping

New App Setup

BASE_URL stands for https://your-slackbot-hosted-domain.com hereafter

  1. Create a new app here
  2. Navigate to the OAuth & Permissions page and add the following Bot Token Scopes:
  • channels:manage
  • channels:read
  • chat:write
  • commands
  • group:read
  • incoming-webhook
  • pins:write
  • team:read
  • users:read
  1. Activate Interactivity & Shortcuts and add this url: BASE_URL/api/slack/action
  2. Activate OAuth & Permissions and add BASE_URL to the Redirect URLs
  3. Activate Slash Commands add two slash commands, using BASE_URL/api/slack/command as the Request URL:
  • /ping
  • /incident - add: [ open | update | close | help ] to the usage hint field
  1. Grab the information needed for .env file from Basic Information section
  2. Navigate to the App Home page and toggle Always Show My Bot as Online (according to your reference)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.