workflow

package
v0.0.0-...-0deb35c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2021 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AllLists = []BoardAndList{
		{"Kanban daily/weekly", "Today"},
		{"Kanban daily/weekly", "Waiting on"},
		{"Kanban daily/weekly", "Done this week"},
		{"Backlog (Personal)", "Backlog"},
		{"Backlog (Personal)", "Projects"},
		{"Backlog (work)", "Backlog"},
		{"Periodic board", "Often"},
		{"Periodic board", "Weekly"},
		{"Periodic board", "Bi-weekly to monthly"},
		{"Periodic board", "Quarterly to Yearly"},
	}
	AllBoards = []Board{
		{"Kanban daily/weekly"},
		{"Backlog (Personal)"},
		{"Periodic board"},
		{"Someday/Maybe"},
		{"Movies, TV"},
	}
)

Functions

func BoardFor

func BoardFor(m *trello.Member, s string) (board *trello.Board, err error)

BoardFor finds trello board for board string with caching -- candidate for pushing into library

func ChecklistTitleFromAttributes

func ChecklistTitleFromAttributes(title string, week int, created *time.Time, estDuration *string, status *string) string

func CreateEmptyMonthlyRetrospective

func CreateEmptyMonthlyRetrospective(summaryIn io.Reader, reviewOut io.Writer) error

CreateEmptyMonthlyRetrospective populates an empty template based on monthly summary

func CreateEmptyWeeklyRetrospective

func CreateEmptyWeeklyRetrospective(summaryIn io.Reader, reviewOut io.Writer) error

CreateEmptyWeeklyRetrospective populates an empty template based on weekly summary

func DailyMaintenance

func DailyMaintenance(user, appkey, authtoken string) error

DailyMaintenance moves cards in kanban board back to their homes at the end of the day

func DumpSummaryForWeek

func DumpSummaryForWeek(user, appkey, authtoken string, year, week int, out io.Writer) error

DumpSummaryForWeek dumps current content of Trello board to summary file for week

func DumpSummaryForWeekFromHistory

func DumpSummaryForWeekFromHistory(user, appkey, authtoken string, week int, out io.Writer) error

DumpSummaryForWeekFromHistory dumps current content of Trello history board to summary file for week

func GenerateSummaryForMonth

func GenerateSummaryForMonth(user, appkey, authtoken string, year, month int, summaryIn [][]byte, reviewIn []WeeklyReviewData, out io.Writer) error

GenerateSummaryForMonth rolls up weekly summaries to month level

func GenerateSummaryForYear

func GenerateSummaryForYear(year int, summaryIn [][]byte, out io.Writer) error

GenerateSummaryForYear rolls up monthly summaries to year level

func GetAttributesFromChecklistTitle

func GetAttributesFromChecklistTitle(name string) (title string, week int, created *time.Time, estDuration *string, status *string)

func GetTitleAndAttributes

func GetTitleAndAttributes(card *trello.Card) (title string, created *string, period *string)

func ListFor

func ListFor(cl *Client, b string, l string) (*trello.List, error)

ListFor finds trello list for board and list with caching -- candidate for pushing into library

func MinutelyMaintenance

func MinutelyMaintenance(user, appkey, authtoken string) error

MinutelyMaintenance does things like cherry picking, moving, adding dates to titles

func MonthlyCleanup

func MonthlyCleanup(user, appkey, authtoken string) error

MonthlyCleanup moves cards to history board

func MorningRemind

func MorningRemind(user, appkey, authtoken, sendgridAPIKey, userEmail string) error

MorningRemind generates and sends an email reminding of weekly goals, daily todos, overdue cards

func VisualizeMonthlyRetrospective

func VisualizeMonthlyRetrospective(summaryIn, reviewIn io.Reader, visOut io.Writer) error

VisualizeMonthlyRetrospective writes out report of monthly goals, sprints

func VisualizeWeeklyRetrospective

func VisualizeWeeklyRetrospective(summaryIn, reviewIn io.Reader, visOut io.Writer) error

VisualizeWeeklyRetrospective writes out report of weekly tasks done, goals, sprints

func VisualizeWeeklySummariesForMonthly

func VisualizeWeeklySummariesForMonthly(summaryIn io.Reader, visOut io.Writer) error

VisualizeMonthlyInput writes out report of weekly review items collated for preparing monthly review

func VisualizeYearlyPlanSummary

func VisualizeYearlyPlanSummary(summaryIn io.Reader, visOut io.Writer) error

VisualizeYearlyPlanSummary writes out report of monthly goals, sprints over the year

func Weekly

func Weekly(user, appkey, authtoken string) error

Weekly writes out report of weekly tasks done, goals, sprints

func WeeklyCleanup

func WeeklyCleanup(user, appkey, authtoken string) error

WeeklyCleanup moves cards to history board, copies periodic cards to history, moves periodic cards back

Types

type Board

type Board struct {
	Board string
}

type BoardAndList

type BoardAndList struct {
	Board string
	List  string
}

func BoardListFor

func BoardListFor(cl *Client, idBoard, idList string) (*BoardAndList, error)

BoardListFor returns board list for trello IDBoard and IDList

func ListForID

func ListForID(ID string) *BoardAndList

ListForID returns board and list info for a particular list ID

type CardAttrs

type CardAttrs struct {
	DoneDate string
	Title    string
}

type Client

type Client struct {
	Client *trello.Client
	Member *trello.Member
}

Client wraps logged in member

func New

func New(user string, appKey string, token string) (c *Client, err error)

New create new client

func (*Client) AddComment

func (cl *Client) AddComment(cardID string, comment string) (*WFTask, error)

AddComment adds comment to card

func (*Client) AddMonthlyGoal

func (cl *Client) AddMonthlyGoal(title string) error

func (*Client) AddWeeklyGoal

func (cl *Client) AddWeeklyGoal(mg *WFMonthlyGoal, title string, week int) error

func (*Client) CreateCard

func (cl *Client) CreateCard(title string, board string, list string) (*trello.Card, error)

func (*Client) GetCard

func (cl *Client) GetCard(cardId string) (*trello.Card, error)

func (*Client) GetMonthlyGoal

func (cl *Client) GetMonthlyGoal(id string) (*WFMonthlyGoal, error)

func (*Client) MonthlyGoals

func (cl *Client) MonthlyGoals() (goals []WFMonthlyGoal, err error)

MonthlyGoals returns all goals for this month

func (*Client) MoveToListOnBoard

func (cl *Client) MoveToListOnBoard(cardID string, listID, boardID string) (*trello.Card, error)

MoveToListOnBoard moves card to board/list

func (*Client) SetDue

func (cl *Client) SetDue(cardID string, due time.Time) (*WFTask, error)

SetDue sets due date/time of card

func (*Client) Tasks

func (cl *Client) Tasks(board, boardList *string) (tasks []WFTask, err error)

Tasks returns all open tasks, possibly limited to a particular board/list

func (*Client) Test

func (cl *Client) Test()

Test does nothing

type DayCards

type DayCards struct {
	Date string
	Done []CardAttrs
}

type DaySummary

type DaySummary struct {
	Date string
	Done []TaskInfo
}

DaySummary is generated from WeeklySummary.Done

type MonthlyGoal

type MonthlyGoal struct {
	Title             string
	WeeklyGoals       []string
	WeeklyGoalsByWeek []string
	LatestWeekGoals   []string
}

type MonthlyGoalInfo

type MonthlyGoalInfo struct {
	Title       string           `yaml:"title"`
	Created     string           `yaml:"createdDate"`
	WeeklyGoals []WeeklyGoalInfo `yaml:"weeklyGoals"`
}

MonthlyGoalInfo defines what a monthly goal looks like - a title, when it was created and a list of weekly goals.

type MonthlyGoalReview

type MonthlyGoalReview struct {
	Title           string   `yaml:"title"` // should match Title of MonthlYGoalInfo
	Accomplishments []string `yaml:"accomplishments"`
	CreatedBy       []string `yaml:"createdBy"`
}

type MonthlyGoals

type MonthlyGoals struct {
	Month string
	Goals []MonthlyGoal
}

type MonthlyRetrospective

type MonthlyRetrospective struct {
	MonthlySummary // mostly source
	MonthlyReview  // populated, joined with source
}

MonthlyRetrospective defines what goes into the visualization template.

type MonthlyReview

type MonthlyReview struct {
	Highlights           []string              `yaml:"highlights"`
	Continue             []string              `yaml:"continue"`
	DoDifferently        []string              `yaml:"doDifferently"`
	MonthlyGoalReviews   []MonthlyGoalReview   `yaml:"monthlyGoalReviews"`
	MonthlySprintReviews []MonthlySprintReview `yaml:"monthlySprintReviews"`
	CandidateGoals       []string              `yaml:"candidateGoals"`
	CandidateSprints     []string              `yaml:"candidateSprints"`
}

MonthlyReview defines the manually input data that goes into the monthly review visualization

type MonthlySprintReview

type MonthlySprintReview struct {
	Title                                     string   `yaml:"title"` // should match Title of MonthlYGoalInfo
	LearningsAndResultsWhatContinueWhatChange []string `yaml:"learningsAndResultsWhatContinueWhatChange"`
}

type MonthlySprints

type MonthlySprints struct {
	Month   string
	Sprints []string
}

type MonthlySummary

type MonthlySummary struct {
	Year                 int                         `yaml:"year"`
	Month                int                         `yaml:"month"`
	WeeksOfYear          string                      `yaml:"weeksOfYear"`
	MonthlyGoals         []MonthlyGoalInfo           `yaml:"monthlyGoals"`
	MonthlySprints       []MonthlyGoalInfo           `yaml:"monthlySprints"`
	Events               []string                    `yaml:"events"`
	GoingWell            []WeeklySummaryItems        `yaml:"goingWell"`
	NeedsImprovement     []WeeklySummaryItems        `yaml:"needsImprovement"`
	Successes            []WeeklySummaryItems        `yaml:"successes"`
	Challenges           []WeeklySummaryItems        `yaml:"challenges"`
	MonthlyGoalSummaries []PerGoalWeeklySummaryItems `yaml:"monthlyGoalSummaries"`
}

MonthlySummary defines the summarization data that is dumped for downstream consumption independent of task management tool (in this case Trello).

for monthly summary, monthly goal and monthly sprint info will merge together weekly goals

type PerGoalReview

type PerGoalReview struct {
	DidToCreateOutcome []string `yaml:"didToCreateOutcome"`
	KeepDoing          []string `yaml:"keepDoing"`
	DoDifferently      []string `yaml:"doDifferently"`
}

type PerGoalWeeklySummaryItems

type PerGoalWeeklySummaryItems struct {
	Goal               string               `yaml:"goal"`
	DidToCreateOutcome []WeeklySummaryItems `yaml:"didToCreateOutcome"`
	KeepDoing          []WeeklySummaryItems `yaml:"keepDoing"`
	DoDifferently      []WeeklySummaryItems `yaml:"doDifferently"`
}

PerGoalWeeklySummaryItems is array of feedback from a particular week for a particular goal

type TaskInfo

type TaskInfo struct {
	CreatedDate string `yaml:"createdDate"`
	DoneDate    string `yaml:"doneDate"`
	Title       string `yaml:"title"`
}

TaskInfo defines what a task looks like -- just reflects what's currenty in trello.

type WFBoardList

type WFBoardList struct {
	Board string
	List  string
}

type WFMonthlyGoal

type WFMonthlyGoal struct {
	IDCard string
	Title  string // `json:"title"`
	// contains filtered or unexported fields
}

WFMonthlyGoal is a wrapper for underlying trello card representation

type WFTask

type WFTask struct {
	ID               string       `json:"id"`
	Title            string       `json:"title"`
	Desc             string       `json:"desc"`
	CreatedDate      *time.Time   `json:"createdDate"`
	URL              *string      `json:"url"`
	Due              *time.Time   `json:"due"`
	List             *WFBoardList `json:"list"`
	Period           *string      `json:"period"`
	DateLastActivity *time.Time   `json:"dateLastActivity"`
	ChecklistItems   []string     `json:"checklistItems"`
}

WFTask wraps underlying trello card representation

type WFWeeklyGoal

type WFWeeklyGoal struct {
	IDCard      string  `json:"idCard"`
	IDCheckitem string  `json:"idCheckitem"`
	Title       string  `json:"title"`
	Year        *int    `json:"year"`
	Month       *int    `json:"month"`
	Week        *int    `json:"week"`
	Done        *bool   `json:"done"`
	Status      *string `json:"status"`
}

WFWeeklyGoal is a wrapper for underlying trello card checklist item

func WeeklyGoals

func WeeklyGoals(mg *WFMonthlyGoal) []WFWeeklyGoal

WeeklyGoals returns WFWeeklyGoals for a given monthly goal

type WeeklyGoalInfo

type WeeklyGoalInfo struct {
	Title   string `yaml:"title"`
	Created string `yaml:"createdDate"`
	Status  string `yaml:"status"`
	Week    int    `yaml:"weekNumber"`
	Year    int    `yaml:"year"`
}

WeeklyGoalInfo defines what a weekly goal looks like

type WeeklyReport

type WeeklyReport struct {
	Week                 string
	DoneByDay            []DayCards
	MonthlyGoalsByMonth  []MonthlyGoals
	LatestMonthlySprints MonthlySprints
	LatestMonthGoals     MonthlyGoals
	NowHHMM              string
}

type WeeklyRetrospective

type WeeklyRetrospective struct {
	WeeklySummary
	WeeklyReview
	NowHHMM        string
	ThisWeekSunday string
	DoneByDay      []DaySummary
}

WeeklyRetrospective defines what goes into the visualization template.

type WeeklyReview

type WeeklyReview struct {
	GoingWell        []string        `yaml:"goingWell"`
	NeedsImprovement []string        `yaml:"needsImprovement"`
	Successes        []string        `yaml:"successes"`
	Challenges       []string        `yaml:"challenges"`
	LearnAboutMyself []string        `yaml:"learnAboutMyself"`
	LearnAboutOthers []string        `yaml:"learnAboutOthers"`
	PerGoalReviews   []PerGoalReview `yaml:"perGoalReviews"`
}

WeeklyReview defines the manually input data that goes into weekly review visualization

type WeeklyReviewData

type WeeklyReviewData struct {
	Year    int
	Month   int
	Week    int
	Content []byte
}

WeeklyReviewData holds raw review content and extra info about the year, month, week it is from

type WeeklySummary

type WeeklySummary struct {
	Year           int               `yaml:"year"`
	Month          int               `yaml:"month"`
	Week           int               `yaml:"weekNumber"`
	Done           []TaskInfo        `yaml:"doneThisWeek"`
	MonthlyGoals   []MonthlyGoalInfo `yaml:"monthlyGoals"`
	MonthlySprints []MonthlyGoalInfo `yaml:"monthlySprints"`
}

WeeklySummary defines the summarization data that is dumped for downstream consumption independent of task management tool (in this case Trello).

func GetSummaryForWeek

func GetSummaryForWeek(user, appkey, authtoken string, year, week int) (*WeeklySummary, error)

GetSummaryForWeek returns a summary structure usable by other downstream in-memory pipelines like daily reminder.

func MorningRemindHtml

func MorningRemindHtml(user, appkey, authtoken string) (*WeeklySummary, string, error)

MorningRemindHtml generates HTML for inspection as well as use in email

type WeeklySummaryItems

type WeeklySummaryItems struct {
	Week    int      `yaml:"week"`
	Content []string `yaml:"content"`
}

WeeklySummaryItems is array of feedback from a particular week

type YearlySummary

type YearlySummary struct {
	Year             int              `yaml:"year"`
	MonthlySummaries []MonthlySummary `yaml:"monthlySummaries"`
}

YearlySummary defines what's dumped for rolling up into the yearly plan summary

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL