Documentation
¶
Overview ¶
Package outbox posts planned review actions through the host-agnostic provider seam.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InlineCommentPayload ¶
type InlineCommentPayload struct {
Body string `json:"body"`
Path string `json:"path"`
Side review.DiffSide `json:"side"`
Line int `json:"line"`
SubjectType review.AnchorKind `json:"subject_type"`
DiffPosition int `json:"diff_position"`
}
InlineCommentPayload is the JSON payload for inline comment actions.
type Options ¶
type Options struct {
Store Store
Provider gitprovider.GitProvider
Limiter Limiter
Now func() time.Time
}
Options contains post-phase dependencies.
type Request ¶
type Request struct {
Run ledger.Run
PRRef gitprovider.PRRef
PostingIdentity gitprovider.Identity
DesiredOutcome ledger.Outcome
ResolveThreadPermissionAdvisory bool
}
Request identifies the run and PR being posted.
type ResolveThreadPayload ¶
type ResolveThreadPayload struct{}
ResolveThreadPayload is the JSON payload for resolve thread actions.
type Result ¶
type Result struct {
Outcome ledger.Outcome
ExitCode int
Posted int
Pending int
FailedTerminal int
Aborted bool
}
Result summarizes post-phase state after Post returns.
type RollupCommentPayload ¶
type RollupCommentPayload struct {
Body string `json:"body"`
}
RollupCommentPayload is the JSON payload for rollup comment actions.
type Store ¶
type Store interface {
ListPlannedActions(ctx context.Context, runID string) ([]ledger.PlannedAction, error)
UpdatePlannedAction(ctx context.Context, action ledger.PlannedAction) error
CompleteRun(ctx context.Context, runID string, outcome ledger.Outcome, completedAt time.Time) error
}
Store is the durable state required by the post phase.
type SubmitReviewPayload ¶
type SubmitReviewPayload struct {
Body string `json:"body"`
Event review.ReviewEvent `json:"event"`
}
SubmitReviewPayload is the JSON payload for submit review actions.
type ThreadReplyPayload ¶
ThreadReplyPayload is the JSON payload for thread reply actions.
type TokenBucket ¶
type TokenBucket struct {
// contains filtered or unexported fields
}
TokenBucket is a goroutine-safe per-host posting limiter.
func NewTokenBucket ¶
func NewTokenBucket(interval time.Duration, burst int) (*TokenBucket, error)
NewTokenBucket creates a per-host token bucket.