pilosus / dienstplan

Slack bot app for duty rotations
https://dienstplan-slack.pilosus.org
Other
21 stars 2 forks source link
bot rotation slack slack-api slack-bot slackbot

dienstplan: slack duty rotations made easy

codecov Docker version

Slack bot for duty rotations.

Why

Quick example

screencast

Let's create a rotation using dienstplan. Just pass in a create command followed by a rotation name, a list of the channel users in a rotation, and a rotation description:

@dienstplan create my-rota @user1 @user2 @user3
On-call engineer's duties:
- Process support team questions queue
- Resolve service alerts
- Check service health metrics
- Casual code refactoring-
 Follow the boy scout rule: always leave the campground cleaner than you found it

Once the rota is set up, the first user in the list becomes a current on-call person. Check it with a who command:

@dienstplan who my-rota

To change the current on-call person to the next one use rotate command:

@dienstplan rotate my-rota

The bot iterates over the users in the list order:

@user1 -> @user2 ->  @user3 -> @user1 -> @user2 ...

Now that you know the basics, let's automate rotation and current duty notifications with Slack's built-in /remind command. First, set up a reminder to rotate users weekly:

/remind #my-channel to "@dienstplan rotate my-rota" every Monday at 9AM UTC

Second, remind duties to a current on-call person:

/remind #my-channel to "@dienstplan who my-rota" every Monday, Tuesday, Wednesday, Thursday, Friday at 10AM UTC

If you prefer crontab format for schedule description, use schedule command instead of /remind:

@dienstplan schedule create "rotate my-rota" 0 9 * * Mon
@dienstplan schedule create "who my-rota" 0 10 * * Mon-Fri

Help

See documentation for more details on installation and usage.

Contributing

See Contributing guide.

License

See LICENSE