Documentation
¶
Overview ¶
Package board implements `zen board`, a live view of the user's own open pull requests and the PRs they've been asked to review.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the zen board bubbletea model: two live tables — the user's own open PRs grouped by status, and PRs they've been asked to review.
func NewModel ¶
NewModel builds the initial board model for cfg. Data is fetched once Init()'s command runs; until then the tables render empty.
type MyPRRow ¶
type MyPRRow struct {
Status Status
Number int
Repo string // short config name
Title string
URL string
Age string
BaseRef string
HeadRef string
// Depth is 0 for an independent PR or the root of a dependency chain,
// and increases by 1 per level for PRs stacked on top of another.
Depth int
// contains filtered or unexported fields
}
MyPRRow is one row of the "My Pull Requests" table.
func FetchMyPRs ¶
FetchMyPRs fetches the user's own open PRs across all configured repos, classifies each into a status bucket, and orders them by dependency chain (a PR immediately followed by anything stacked on top of it), with chains and independent PRs ranked by status priority then age (oldest first).
type ReviewRow ¶
type ReviewRow struct {
Kind string // github.ReviewKindNew or github.ReviewKindRereview
Number int
Repo string // short config name
Title string
Author string
URL string
Age string
// contains filtered or unexported fields
}
ReviewRow is one row of the "Needs Your Review" table.
func FetchReviewRequests ¶
FetchReviewRequests fetches PRs the user has been asked to review across all configured repos, unfiltered by the `authors` config — a "don't miss anything" dashboard shouldn't hide a review request just because the author isn't in the curated inbox list. Sorted into three tiers — configured authors, PRs touching a configured watch_paths entry, then everyone else — and by age (most recent first) within each tier.
type Status ¶
type Status string
Status is a display bucket for one of the user's own open pull requests.
const ( StatusDraft Status = "draft" StatusFailingCI Status = "failing_ci" StatusChangesRequested Status = "changes_requested" StatusReady Status = "ready" StatusInReview Status = "in_review" StatusInFlight Status = "in_flight" )
The status buckets for "My PRs", in display priority order (most actionable-by-you first).
func ClassifyMyPR ¶
ClassifyMyPR maps a MyPR's draft/review/CI state into a single display bucket, checked in this order:
- Draft — not ready for review, everything else is moot
- Failing CI — checks broke, the most urgent thing to fix regardless of review state
- Changes requested — a reviewer is waiting on you
- Ready to merge — approved and nothing blocking
- In review — reviewers requested, no verdict yet
- In flight — open, nobody's been asked to review yet