review

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TrackCmd

func TrackCmd(appConfig *config.AppConfig) *cobra.Command

TrackCmd returns the cobra command for both `git zf review track` and `git zf issue track`. Both command groups call this constructor — one implementation, two aliases in different namespaces.

Types

type Review

type Review struct {
	// contains filtered or unexported fields
}

Review is the `git zf review` command group.

func New

func New(appConfig *config.AppConfig) Review

New creates a Review command group.

func (Review) GetRootCmd

func (r Review) GetRootCmd() *cobra.Command

GetRootCmd returns the `review` cobra command with all subcommands registered.

type ReviewPrompter

type ReviewPrompter interface {
	// PickBranch presents a branch list with a configurable title and a smart
	// default (the branch whose IssueSlug matches currentSlug, or the first row).
	// Used by request, approve, reject, sync, and status subcommands.
	PickBranch(ctx context.Context, title string, branches []store.BranchRow, currentSlug string) (*store.BranchRow, error)

	// PickIssueToStart presents a list of issue slugs available to start reviewing.
	// Used by the start subcommand.
	PickIssueToStart(ctx context.Context, slugs []string) (string, error)

	// PickTrackerStatus presents the tracker's status list and returns the chosen
	// status name (or "" to skip). Used by request/approve/reject to update the
	// originating tracker, mirroring issue close.
	PickTrackerStatus(ctx context.Context, issueID, trackerType string, statuses []string) (string, error)

	// Confirm presents a yes/no confirmation with the given title. Used by the
	// request flow to offer merging pending reviewer commits before re-requesting.
	Confirm(ctx context.Context, title string) (bool, error)
}

ReviewPrompter resolves every user-facing decision in the review flow. The production implementation drives huh forms; tests use scriptedReviewPrompter.

Jump to

Keyboard shortcuts

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