plannedactions

package
v0.10.257 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package plannedactions defines the canonical planned-action vocabulary.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action added in v0.10.255

type Action struct {
	ActionID  string
	Kind      ActionKind
	FindingID review.FindingID
	ThreadID  string
	PlannedAt time.Time
	Status    ActionStatus
	Required  bool

	InlineComment *InlineCommentPayload
	ThreadReply   *ThreadReplyPayload
	ResolveThread *ResolveThreadPayload
	RollupComment *RollupCommentPayload
	SubmitReview  *SubmitReviewPayload
}

Action is the canonical metadata and typed payload for one planned action.

func (Action) Payload added in v0.10.255

func (a Action) Payload() (any, error)

Payload returns the payload matching the action kind.

type ActionKind added in v0.10.255

type ActionKind string

ActionKind identifies a planned host-side action.

const (
	ActionKindInlineComment ActionKind = "inline_comment"
	ActionKindThreadReply   ActionKind = "thread_reply"
	ActionKindResolveThread ActionKind = "resolve_thread"
	ActionKindRollupComment ActionKind = "rollup_comment"
	ActionKindSubmitReview  ActionKind = "submit_review"
)

Action kind values.

func (ActionKind) String added in v0.10.255

func (k ActionKind) String() string

String returns the persisted action kind.

func (ActionKind) Valid added in v0.10.255

func (k ActionKind) Valid() bool

Valid reports whether k is a known action kind.

type ActionStatus added in v0.10.255

type ActionStatus string

ActionStatus records the lifecycle status of a planned action.

const (
	ActionStatusPending        ActionStatus = "pending"
	ActionStatusPosted         ActionStatus = "posted"
	ActionStatusFailedTerminal ActionStatus = "failed_terminal"
	ActionStatusSuperseded     ActionStatus = "superseded"
	ActionStatusPlannedOnly    ActionStatus = "planned_only"
)

Action status values.

func (ActionStatus) String added in v0.10.255

func (s ActionStatus) String() string

String returns the persisted action status.

func (ActionStatus) Valid added in v0.10.255

func (s ActionStatus) Valid() bool

Valid reports whether s is a known action status.

type InlineCommentPayload added in v0.10.255

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 provider-neutral inline comment payload.

type ResolveThreadPayload added in v0.10.255

type ResolveThreadPayload struct{}

ResolveThreadPayload is the resolve-thread payload.

type RollupCommentPayload added in v0.10.255

type RollupCommentPayload struct {
	Body string `json:"body"`
}

RollupCommentPayload is the rollup comment payload.

type SubmitReviewPayload added in v0.10.255

type SubmitReviewPayload struct {
	Body  string             `json:"body"`
	Event review.ReviewEvent `json:"event"`
}

SubmitReviewPayload is the submit-review payload.

type ThreadReplyPayload added in v0.10.255

type ThreadReplyPayload struct {
	Body    string `json:"body"`
	Summary bool   `json:"summary"`
}

ThreadReplyPayload is the thread reply payload.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL