Skip to content

jaffee/sked

Repository files navigation

Scheduling slackbot based on https://github.com/rapidloop/mybot

Capabilities

Add people to the schedule

List everyone on the schedule

Get the current scheduled person

Get the scheduled person for a specified date/time

Get the schedule

Schedule a person for a certain time

Remove people from the schedule

Mark a person as unavailable for certain times

notify a channel of who is responsible for support when it changes - or at a specified interval

notify the person who is scheduled in advance of their shift

Tasks

Make help messages available

refactor action functions to make them more testable.

Probably just have them return a string which will be the message to send, and no longer take in websock.Conn and Message

write tests

move unavailability tracking onto person struct

Then make isAvailable a method on that struct

test scheduling methods

increase fairness of scheduling

track all commands entered

track all past shifts

persist data

2.0 design

Configuration

lists

Lists of Schedulable things, i.e. Support Engineers

  • default list
  • associated actions
  • schedule parameters - i.e. weekly, daily, offset

interface Schedulable

isAvailable(start time.Time, end time.Time)

Notes

schedule building

For each schedule slot (starting with the nearest): Determine a priority for each person. Put the highest priority person (who is available) in the slot.

priority determination

  • Cannot schedule someone for 2 slots in a row. (unless there is no other choice)
  • Should be the person who has worked least recently

proposal

start everyone at the same priority (int)

when you work a shift your priority increases by num_people. When you don’t work a shift, your priority decreases by 1.

The person with the lowest priority works (if they are available).

About

Scheduling slackbot in go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages