Documentation
¶
Overview ¶
Package view is the item view the loop projects to every sink: a semantic status, unread and a summary line, never a sink's vocabulary.
Index ¶
Constants ¶
const ( StateMerged = "MERGED" StateClosed = "CLOSED" )
The states of AuthorFacts.State.
Variables ¶
This section is empty.
Functions ¶
func AuthorColumn ¶
func AuthorColumn(f AuthorFacts, current Status) (to Status, unread bool, reason string, need LocalNeed)
AuthorColumn decides where an author card in current moves. to is None when it stays; need asks the caller to inspect that much of the checkout and decide again with Local set.
Types ¶
type Applied ¶
type Applied struct {
Unit unit.Unit
Role Role
Status Status
Unread bool
Summary string
Column string
Override string
At time.Time
}
Applied is what a sink last received for an item: the column it wrote, or, when the user's placement is outside the sink's managed vocabulary, that placement as Override and no column.
type AuthorFacts ¶
type AuthorFacts struct {
State string
Draft, Approved, ChecksPass, ChangesRequestedOnHead bool
Mergeable, Base string
// ConflictingFor is how long the pull request has been seen CONFLICTING,
// zero when it has not or without an inventory.
ConflictingFor, ConfirmConflictAfter time.Duration
// Local is nil when the checkout was not inspected.
Local *LocalFacts
// AuthorWorkspace and ReviewWorkspace say the user's board has a
// workspace of that role for the pull request, whose card the facts move
// without a turn; AuthorWorkspace is false while an address round is due,
// since that round's turn moves the card.
AuthorWorkspace, ReviewWorkspace bool
}
AuthorFacts are what the author column of a pull request is decided from.
func (AuthorFacts) Finished ¶
func (f AuthorFacts) Finished() bool
Finished is true for a merged or closed pull request.
type Item ¶
type Item struct {
Unit unit.Unit
Role Role
Status Status
Unread bool
Summary string
// At is the time of the newest turn the item projects; the newest unit
// owns a card shared by several.
At time.Time
}
func Author ¶
Author projects an author card. A turn of intents that asks or stopped needs me; once last, the status a sink last applied, is needs-me, the turn moving on or an answer typed into its session puts the item in progress. With f, the pull request's facts also move the card (see AuthorColumn), unless the turn needs me. Without a turn, only the facts of a pull request with an author workspace move it. Without f, or when nothing moves the card, it has no opinion.
type LocalFacts ¶
type LocalNeed ¶
type LocalNeed int
LocalNeed is how much of the checkout AuthorColumn must read to decide.
type Status ¶
type Status string
const ( None Status = "" Working Status = "working" NeedsMe Status = "needs-me" Reviewed Status = "reviewed" Done Status = "done" InProgress Status = "in-progress" InReview Status = "in-review" Ready Status = "ready" Completed Status = "completed" // Elsewhere is a card the sink does not manage the column of: the user's. Elsewhere Status = "elsewhere" )