Documentation
¶
Overview ¶
Package situation derives who a pull request is waiting on, and since when, from its snapshot and its event history.
Index ¶
Constants ¶
const NudgeWindow = 2 * time.Hour
NudgeWindow bounds how long after a nudge is asked for its comment can be posted: the agent reads the pull request first.
const ReasonMax = 200
ReasonMax bounds a reason that comes from an agent or a CI, so a row and a notification stay one line.
Variables ¶
var Order = []Kind{KindRoundPending, KindLoopWaiting, KindLoopStopped, KindBlocked, KindToAddress, KindHeldByCap, KindLoopWorking, KindChanges, KindChecks, KindConflicts, KindReply, KindReviewerBack, KindReview, KindNoReviewer, KindMerge, KindDraft, KindMuted, KindDone}
Order is every kind as the cockpit ranks them: what needs the user first.
Functions ¶
This section is empty.
Types ¶
type Input ¶
type Input struct {
PR dinv.PR
Events []dinv.Event
Override dinv.Override
Viewer string // my login
MyTeams []string // "org/slug", any case
Ignore []string // actors whose comments and reviews never count: automated reviewers
Now time.Time
Stalled config.Stalled
// Turn is the pull request's newest review or address turn, else its
// newest turn; nil without one.
Turn *TurnFacts
// SessionWaiting means Orca shows the session of Turn waiting.
SessionWaiting bool
}
type Kind ¶
type Kind string
const ( KindDone Kind = "done" KindMuted Kind = "muted" KindHeldByCap Kind = "held" KindBlocked Kind = "blocked" KindToAddress Kind = "to_address" KindRoundPending Kind = "round_pending" KindLoopWorking Kind = "loop_working" KindLoopWaiting Kind = "loop_waiting" KindLoopStopped Kind = "loop_stopped" KindDraft Kind = "draft" KindChecks Kind = "checks" KindChanges Kind = "changes" KindMerge Kind = "merge" KindConflicts Kind = "conflicts" KindReply Kind = "reply" KindReviewerBack Kind = "reviewer_back" KindReview Kind = "review" KindNoReviewer Kind = "no_reviewer" )
type Result ¶
type TurnFacts ¶
type TurnFacts struct {
Intent dintent.Name
// Role is the role the turn's intent held.
Role string
State, Summary string
// At is when the turn reached its state; AnsweredAt is when an answer
// was typed or resumed after its last record, zero without one.
At, AnsweredAt time.Time
}
TurnFacts is what the loop's store says of a turn.