Name: oncall-bot
Owner: Meteor
Description: Sync a PagerDuty schedule's current on-call to a Slack channel's topic (implemented in Meteor)
Created: 2017-04-27 22:33:33.0
Updated: 2017-06-11 19:08:25.0
Pushed: 2017-06-13 01:07:16.0
Homepage: null
Size: 8
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This bot maintains a single Slack channel's topic to contain the name of the level-1 on-call user for a given PagerDuty schedule ID.
Create a settings.json file like:
agerduty": {
"scheduleID": "ID",
"pagerdutyToken": "TOKEN"
lack": {
"channelName": "galaxy-alerts",
"slackToken": "TOKEN1",
"slackAdminToken": "TOKEN2"
ntervalMS": 30000,
tatusUsers": {
"U02FWGZ19": "glasser@meteor.com"
PTJS3I9
) to the pagerduty.scheduleID settings fieldchannels:read
channels:write
users:read
users.profile:write
. Put its Access Token into
slack.slackAdminToken. This is used to set the status emoji and text for
arbitrary users.Users listed (by Slack ID) in the status section will have their status text and emoji set as configured when they are on call, and cleared if they are not on call any more and their status starts with 'On call!'. (If they already have a status, it is appended to the 'On call!' status text along with its emoji, and restored when they go off call.)
The simplest way to find a Slack ID is to run users.list via the Slack API tester and find the id field corresponding to the user.
Deploy to Galaxy. (This is deployed to galaxy-primary-oncall-bot.meteorapp.com.)