Documentation
¶
Overview ¶
Package board is the f10 board command: what changed in a window, or with --state where every task stands, as text, JSON or an HTML page.
Index ¶
- Constants
- Variables
- func BoardNode(r BoardLine, p lookaround.Project, withProject bool, links *render.TaskLinks) tasktree.Node
- func BoardTasks(rows []hostops.Row, prefix string) []lookaround.Task
- func Command() *cli.Command
- func EmitBoard(w io.Writer, path string, data []byte) error
- func RenderBoard(w io.Writer, b lookaround.Board, limit int)
- func RenderBoardHTML(w io.Writer, b lookaround.Board) error
- func RenderByPerson(w io.Writer, boards []lookaround.Board, limit int)
- func RenderSummary(w io.Writer, boards []lookaround.Board, now time.Time, limit int)
- func ResolveBoardSpan(arg string, state bool, now time.Time, ...) (board.Span, error)
- func TitleAfterKey(title, key string) string
- type BoardLine
- type BoardModel
Constants ¶
const BoardPage = board.Page
const BoardPlaceholder = "__BOARD_JSON__"
BoardPlaceholder cannot occur in HTML by accident.
const BoardStateWindow = board.StateWindow
BoardStateWindow is board.StateWindow.
Variables ¶
var BoardHTMLPage string
BoardHTMLPage is board.html, the static report, one file with a placeholder for the Board JSON; the page decides no stage and fetches nothing.
Functions ¶
func BoardNode ¶
func BoardNode(r BoardLine, p lookaround.Project, withProject bool, links *render.TaskLinks) tasktree.Node
BoardNode is a board line as a tree row: the title fills what the terminal leaves, and the tail (PRs, who, next) follows it.
func BoardTasks ¶
func BoardTasks(rows []hostops.Row, prefix string) []lookaround.Task
BoardTasks is board.Tasks.
func Command ¶
Command is the board noun, which reads the host, the tracker and this machine, each a source that can fail alone, and derives nothing: lookaround decides every group and stage, and the terminal, --json and --html draw the same rows.
func RenderBoard ¶
func RenderBoard(w io.Writer, b lookaround.Board, limit int)
RenderBoard is a glance at the board; --json is the contract.
func RenderBoardHTML ¶
func RenderBoardHTML(w io.Writer, b lookaround.Board) error
RenderBoardHTML needs no template engine: the encoder escapes `<`, `>` and `&`, so a title holding `</script>` cannot end the data tag early.
func RenderByPerson ¶
func RenderByPerson(w io.Writer, boards []lookaround.Board, limit int)
func RenderSummary ¶
RenderSummary is a scope at a glance, one line per project.
func ResolveBoardSpan ¶
func ResolveBoardSpan( arg string, state bool, now time.Time, workdays func() (calendar.Workdays, error), ) (board.Span, error)
ResolveBoardSpan is board.ResolveSpan.
func TitleAfterKey ¶
TitleAfterKey drops the "<key>: " a request's title often starts with, and a bundle's riders tag after it, since the row already shows the key; FT-12 never matches FT-121.
Types ¶
type BoardLine ¶
type BoardLine struct {
Group string `json:"group"`
Key string `json:"key"`
URL string `json:"url,omitempty"`
Stage string `json:"stage"`
StageFrom string `json:"stage_from"`
Title string `json:"title,omitempty"`
PR int `json:"pr,omitempty"`
PRURL string `json:"pr_url,omitempty"`
Parts []boardPR `json:"parts,omitempty"` // a feed row's task's other requests overlapping PR
Who string `json:"who,omitempty"`
BranchLeft bool `json:"branch_left,omitempty"` // a merged row's branch outlived its worktree
Next string `json:"next,omitempty"`
NextCommand bool `json:"next_command,omitempty"`
}
type BoardModel ¶
type BoardModel struct {
Header string `json:"header,omitempty"`
Notes []boardNote `json:"notes"`
Empty string `json:"empty,omitempty"`
Rows []BoardLine `json:"rows"`
Quiet string `json:"quiet,omitempty"`
}
A BoardModel is what a renderer draws. board.html builds the same model in JavaScript; the JSON tags are the parity test's contract.
func BoardLines ¶
func BoardLines(b lookaround.Board) BoardModel
BoardLines reduces the board to its model. The feed skips its local source on purpose, so a skip there is no note; a local-only checkout notes its host alone.