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 = plannedactions.InlineCommentPayload
InlineCommentPayload is an alias for the canonical inline comment payload.
type LiveProvider ¶ added in v0.10.255
type LiveProvider interface {
Provider
GetPR(context.Context, gitprovider.PRRef) (gitprovider.PR, error)
}
LiveProvider adds the pull-request read required by live orchestration.
type Provider ¶ added in v0.10.255
type Provider interface {
ListInlineThreads(context.Context, gitprovider.PRRef) ([]gitprovider.InlineThread, error)
ListReviews(context.Context, gitprovider.PRRef) ([]gitprovider.Review, error)
ListIssueComments(context.Context, gitprovider.PRRef) ([]gitprovider.IssueComment, error)
PostInlineComment(context.Context, gitprovider.PRRef, gitprovider.InlineComment) (gitprovider.CommentID, error)
ReplyToThread(context.Context, gitprovider.PRRef, gitprovider.ThreadID, string) (gitprovider.CommentID, error)
ResolveThread(context.Context, gitprovider.PRRef, gitprovider.ThreadID) error
PostIssueComment(context.Context, gitprovider.PRRef, string) (gitprovider.CommentID, error)
SubmitReview(context.Context, gitprovider.PRRef, gitprovider.ReviewRequest) (gitprovider.ReviewID, error)
Capabilities() gitprovider.ProviderCaps
}
Provider is the git-provider behavior required by the post phase.
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 = plannedactions.ResolveThreadPayload
ResolveThreadPayload is an alias for the canonical resolve-thread payload.
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 = plannedactions.RollupCommentPayload
RollupCommentPayload is an alias for the canonical rollup comment payload.
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 = plannedactions.SubmitReviewPayload
SubmitReviewPayload is an alias for the canonical submit-review payload.
type ThreadReplyPayload ¶
type ThreadReplyPayload = plannedactions.ThreadReplyPayload
ThreadReplyPayload is an alias for the canonical thread reply payload.
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.