package taskplan type Kind string const ( Bug Kind = "bug" Feature Kind = "feature" RenderedChange Kind = "rendered_change" Recommendation Kind = "recommendation" Investigation Kind = "investigation" MaxSteps = 16 ) type Step struct { Key, Specialist, Action, Instructions string ConnectionID, Model, SelectionReason string Required bool DependsOn []string } type Plan struct { TaskID string Revision int64 Kind Kind ProjectID int64 Steps []Step PlaybookID string PlaybookRevision int64 } func BugPlan(id string, project int64) Plan { return Plan{TaskID: id, Revision: 1, Kind: Bug, ProjectID: project, Steps: []Step{ {Key: "reproduce", Specialist: "engineering", Action: "reproduce"}, {Key: "implement", Specialist: "engineering", Action: "implement"}, {Key: "review", Specialist: "review", Action: "review", Required: true}, {Key: "verify", Action: "checks", Required: true}, {Key: "publish", Action: "publish"}, {Key: "merge", Action: "person", Required: true}, }} } func Publication(k Kind) bool { return k == Bug || k == Feature || k == RenderedChange } func Candidate(s Step) bool { return s.Action == "implement" || s.Action == "copy" || s.Action == "design" }