stack

package
v0.17.15 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: MIT Imports: 40 Imported by: 0

Documentation

Overview

Package stack provides CLI commands for operating on entire stacks.

Package stack provides CLI commands for operating on entire stacks.

Package stack provides CLI commands for operating on entire stacks.

Package stack provides CLI commands for operating on entire stacks.

Package stack provides CLI commands for operating on entire stacks.

Package stack provides CLI commands for operating on entire stacks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAbortUI

func NewAbortUI(out output.Output, interactive bool) abort.Handler

NewAbortUI creates a handler for abort operations. Caller must defer handler.Cleanup() to restore terminal on exit.

func NewFlattenCmd

func NewFlattenCmd() *cobra.Command

NewFlattenCmd creates the flatten command

func NewFlattenUI

func NewFlattenUI(out output.Output, logger output.Logger) (*tui.Runner, flatten.Handler)

NewFlattenUI creates a runner and handler pair for flatten operations. The runner manages terminal state; the handler processes events. Caller must defer runner.Cleanup() to restore terminal on exit.

func NewForeachCmd

func NewForeachCmd() *cobra.Command

NewForeachCmd creates the foreach command

func NewForeachUI

func NewForeachUI(out output.Output, logger output.Logger, parallel bool) (*tui.Runner, foreach.Handler)

NewForeachUI creates a runner and handler pair for foreach operations. The runner manages terminal state; the handler processes events. Caller must defer runner.Cleanup() to restore terminal on exit.

func NewMergeCmd

func NewMergeCmd() *cobra.Command

NewMergeCmd creates the merge command

func NewMoveCmd

func NewMoveCmd() *cobra.Command

NewMoveCmd creates the move command

func NewMoveUI

func NewMoveUI(out output.Output, _ output.Logger, interactive bool) (*tui.Runner, move.Handler)

NewMoveUI creates a runner and handler pair for move operations. The runner manages terminal state; the handler processes events. Caller must defer runner.Cleanup() to restore terminal on exit. Currently returns nil runner as there's no TUI component yet.

func NewNavigationUI

func NewNavigationUI(out output.Output, interactive bool) navigation.Handler

NewNavigationUI creates a handler for navigation operations. Caller must defer handler.Cleanup() to restore terminal on exit.

func NewPluckCmd

func NewPluckCmd() *cobra.Command

NewPluckCmd creates the pluck command

func NewPluckUI

func NewPluckUI(out output.Output, _ output.Logger, interactive bool) (*tui.Runner, pluck.Handler)

NewPluckUI creates a runner and handler pair for pluck operations. The runner manages terminal state; the handler processes events. Caller must defer runner.Cleanup() to restore terminal on exit. Currently returns nil runner as there's no TUI component yet.

func NewReorderCmd

func NewReorderCmd() *cobra.Command

NewReorderCmd creates the reorder command

func NewRestackCmd

func NewRestackCmd() *cobra.Command

NewRestackCmd creates the restack command

func NewScopeUI

func NewScopeUI(out output.Output, interactive bool) scope.Handler

NewScopeUI creates a handler for scope operations. Caller must defer handler.Cleanup() to restore terminal on exit.

func NewSsCmd

func NewSsCmd() *cobra.Command

NewSsCmd creates the ss command, which is an alias for submit --stack

func NewSubmitCmd

func NewSubmitCmd() *cobra.Command

NewSubmitCmd creates the submit command

func NewSubmitUI

func NewSubmitUI(out output.Output, logger output.Logger) (*tui.Runner, submit.Handler)

NewSubmitUI creates a runner and handler pair for submit operations. The runner manages terminal state; the handler processes events. Caller must defer runner.Cleanup() to restore terminal on exit.

func NewSyncCmd

func NewSyncCmd() *cobra.Command

NewSyncCmd creates the sync command

func NewSyncUI

func NewSyncUI(out output.Output, logger output.Logger) (*tui.Runner, syncAction.Handler)

NewSyncUI creates a runner and handler pair for sync operations. The runner manages terminal state; the handler processes events. Caller must defer runner.Cleanup() to restore terminal on exit.

func NewTrackUI

func NewTrackUI(out output.Output, interactive bool) track.Handler

NewTrackUI creates a handler for track operations. Caller must defer handler.Cleanup() to restore terminal on exit.

func NewUntrackUI

func NewUntrackUI(out output.Output, interactive bool) untrack.Handler

NewUntrackUI creates a handler for untrack operations. Caller must defer handler.Cleanup() to restore terminal on exit.

Types

type InteractiveAbortHandler

type InteractiveAbortHandler struct {
	SimpleAbortHandler
}

InteractiveAbortHandler provides interactive prompts for abort operations

func NewInteractiveAbortHandler

func NewInteractiveAbortHandler(out output.Output) *InteractiveAbortHandler

NewInteractiveAbortHandler creates a new InteractiveAbortHandler

func (*InteractiveAbortHandler) IsInteractive

func (h *InteractiveAbortHandler) IsInteractive() bool

IsInteractive returns true for interactive handler

func (*InteractiveAbortHandler) PromptConfirmAbort

func (h *InteractiveAbortHandler) PromptConfirmAbort() (bool, error)

PromptConfirmAbort prompts user to confirm aborting the current operation

type InteractiveFlattenHandler

type InteractiveFlattenHandler struct {
	SimpleFlattenHandler
	// contains filtered or unexported fields
}

InteractiveFlattenHandler provides interactive prompts for flatten operations

func NewInteractiveFlattenHandler

func NewInteractiveFlattenHandler(out output.Output, runner *tui.Runner, model *flattenComponent.Model) *InteractiveFlattenHandler

NewInteractiveFlattenHandler creates a new InteractiveFlattenHandler

func (*InteractiveFlattenHandler) Cleanup

func (h *InteractiveFlattenHandler) Cleanup()

Cleanup restores the terminal

func (*InteractiveFlattenHandler) Complete

func (h *InteractiveFlattenHandler) Complete(result flatten.Result)

Complete sends completion message to the TUI

func (*InteractiveFlattenHandler) IsInteractive

func (h *InteractiveFlattenHandler) IsInteractive() bool

IsInteractive returns true for interactive handler

func (*InteractiveFlattenHandler) OnStep

func (h *InteractiveFlattenHandler) OnStep(step flatten.Step, status handler.StepStatus, _ string)

OnStep sends step updates to the TUI

func (*InteractiveFlattenHandler) OnValidationProgress

func (h *InteractiveFlattenHandler) OnValidationProgress(current, total int, branchName string)

OnValidationProgress sends validation progress to the TUI

func (*InteractiveFlattenHandler) PromptConfirmFlatten

func (h *InteractiveFlattenHandler) PromptConfirmFlatten(preview flatten.Preview) (bool, error)

PromptConfirmFlatten displays a preview of the flatten and asks for confirmation

type InteractiveForeachHandler

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

InteractiveForeachHandler implements foreach.Handler with bubbletea for animated progress

func NewInteractiveForeachHandler

func NewInteractiveForeachHandler(runner *tui.Runner, model *foreachComponent.Model, out output.Output) *InteractiveForeachHandler

NewInteractiveForeachHandler creates a new interactive foreach handler

func (*InteractiveForeachHandler) OnEvent

func (h *InteractiveForeachHandler) OnEvent(e foreach.Event)

OnEvent handles events from the foreach action

type InteractiveMoveHandler

type InteractiveMoveHandler struct {
	SimpleMoveHandler
}

InteractiveMoveHandler provides interactive prompts for move operations

func NewInteractiveMoveHandler

func NewInteractiveMoveHandler(out output.Output) *InteractiveMoveHandler

NewInteractiveMoveHandler creates a new InteractiveMoveHandler

func (*InteractiveMoveHandler) IsInteractive

func (h *InteractiveMoveHandler) IsInteractive() bool

IsInteractive returns true for interactive handler

func (*InteractiveMoveHandler) PromptConfirmMove

func (h *InteractiveMoveHandler) PromptConfirmMove(preview move.Preview) (bool, error)

PromptConfirmMove displays a preview of the move and asks for confirmation

func (*InteractiveMoveHandler) PromptRename

func (h *InteractiveMoveHandler) PromptRename(_, oldScope, newScope string) (bool, error)

PromptRename prompts user to confirm branch rename due to scope change

func (*InteractiveMoveHandler) PromptSelectOnto

func (h *InteractiveMoveHandler) PromptSelectOnto(ctx *app.Context, sourceBranch string) (string, []engine.RebaseSpec, error)

PromptSelectOnto prompts user to select a new parent when --onto is not provided.

type InteractiveNavigationHandler

type InteractiveNavigationHandler struct {
	SimpleNavigationHandler
}

InteractiveNavigationHandler provides interactive prompts for navigation operations

func NewInteractiveNavigationHandler

func NewInteractiveNavigationHandler(out output.Output) *InteractiveNavigationHandler

NewInteractiveNavigationHandler creates a new InteractiveNavigationHandler

func (*InteractiveNavigationHandler) IsInteractive

func (h *InteractiveNavigationHandler) IsInteractive() bool

IsInteractive returns true for interactive handler

func (*InteractiveNavigationHandler) PromptSelectBranch

func (h *InteractiveNavigationHandler) PromptSelectBranch(message string, branches []string) (string, error)

PromptSelectBranch prompts user to select a branch from the list

type InteractivePluckHandler

type InteractivePluckHandler struct {
	SimplePluckHandler
}

InteractivePluckHandler provides interactive prompts for pluck operations

func NewInteractivePluckHandler

func NewInteractivePluckHandler(out output.Output) *InteractivePluckHandler

NewInteractivePluckHandler creates a new InteractivePluckHandler

func (*InteractivePluckHandler) IsInteractive

func (h *InteractivePluckHandler) IsInteractive() bool

IsInteractive returns true for interactive handler

func (*InteractivePluckHandler) PromptConfirmPluck

func (h *InteractivePluckHandler) PromptConfirmPluck(preview pluck.Preview) (bool, error)

PromptConfirmPluck displays a preview of the pluck and asks for confirmation

type InteractiveScopeHandler

type InteractiveScopeHandler struct {
	SimpleScopeHandler
}

InteractiveScopeHandler provides interactive prompts for scope operations

func NewInteractiveScopeHandler

func NewInteractiveScopeHandler(out output.Output) *InteractiveScopeHandler

NewInteractiveScopeHandler creates a new InteractiveScopeHandler

func (*InteractiveScopeHandler) IsInteractive

func (h *InteractiveScopeHandler) IsInteractive() bool

IsInteractive returns true for interactive handler

func (*InteractiveScopeHandler) PromptConfirmRename

func (h *InteractiveScopeHandler) PromptConfirmRename(_, oldScope, newScope string) (bool, error)

PromptConfirmRename prompts user to confirm branch rename after scope change

type InteractiveSubmitHandler

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

InteractiveSubmitHandler implements submit.Handler with bubbletea for animated progress

func NewInteractiveSubmitHandler

func NewInteractiveSubmitHandler(runner *tui.Runner, model *submitComponent.Model) *InteractiveSubmitHandler

NewInteractiveSubmitHandler creates a new interactive submit handler

func (*InteractiveSubmitHandler) Confirm

func (h *InteractiveSubmitHandler) Confirm(message string, defaultYes bool) (bool, error)

Confirm prompts for user confirmation

func (*InteractiveSubmitHandler) IsInteractive

func (h *InteractiveSubmitHandler) IsInteractive() bool

IsInteractive returns true - interactive handler supports prompts.

func (*InteractiveSubmitHandler) OnEvent

func (h *InteractiveSubmitHandler) OnEvent(e submit.Event)

OnEvent handles events from the submit action

type InteractiveSyncHandler

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

InteractiveSyncHandler provides bubbletea TUI for TTY environments

func NewInteractiveSyncHandler

func NewInteractiveSyncHandler(runner tui.Sender, model *syncComponent.Model, out output.Output, logger output.Logger) *InteractiveSyncHandler

NewInteractiveSyncHandler creates a new InteractiveSyncHandler

func (*InteractiveSyncHandler) Cleanup

func (h *InteractiveSyncHandler) Cleanup()

Cleanup is a no-op - terminal cleanup is handled by the runner via defer.

func (*InteractiveSyncHandler) Complete

func (h *InteractiveSyncHandler) Complete(summary syncAction.Summary)

Complete is called when sync finishes

func (*InteractiveSyncHandler) EmitEvent

func (h *InteractiveSyncHandler) EmitEvent(event syncAction.Event)

EmitEvent handles progress updates

func (*InteractiveSyncHandler) IsInteractive

func (h *InteractiveSyncHandler) IsInteractive() bool

IsInteractive implements Handler. Returns true for TTY handler.

func (*InteractiveSyncHandler) OnRestackBranch

func (h *InteractiveSyncHandler) OnRestackBranch(branch string, result syncAction.RestackResult, newRev string, prNumber *int, lockReason engine.LockReason, frozen bool, isCurrent bool, parent string, reparented bool, oldParent, newParent string, rerereResolvedCount int)

OnRestackBranch implements RestackHandler for standalone restack operations

func (*InteractiveSyncHandler) OnRestackComplete

func (h *InteractiveSyncHandler) OnRestackComplete(restacked, skipped int, conflicts []string)

OnRestackComplete implements RestackHandler for standalone restack operations

func (*InteractiveSyncHandler) OnRestackStart

func (h *InteractiveSyncHandler) OnRestackStart(branchCount int)

OnRestackStart implements RestackHandler for standalone restack operations

func (*InteractiveSyncHandler) Pause

func (h *InteractiveSyncHandler) Pause()

Pause releases the terminal so external prompts can run without contending with the active Bubble Tea program. Implements rerere.Pauser.

func (*InteractiveSyncHandler) PromptBranchDeletions

func (h *InteractiveSyncHandler) PromptBranchDeletions(branches map[string]string, unpushedBranches map[string]bool) (map[string]bool, error)

PromptBranchDeletions implements Handler. Pauses TUI, displays planned deletions, prompts for each.

func (*InteractiveSyncHandler) PromptMetadataConflict

func (h *InteractiveSyncHandler) PromptMetadataConflict(diff *engine.MetadataDiff) (bool, error)

PromptMetadataConflict implements Handler. Pauses TUI, displays conflict, prompts user.

func (*InteractiveSyncHandler) PromptOrphanedMetadata

func (h *InteractiveSyncHandler) PromptOrphanedMetadata(info engine.OrphanedMetadataInfo) (bool, error)

PromptOrphanedMetadata implements Handler. Pauses TUI, displays info, prompts user.

func (*InteractiveSyncHandler) PromptResolveConflicts

func (h *InteractiveSyncHandler) PromptResolveConflicts(conflictBranches []string) (bool, error)

PromptResolveConflicts implements Handler. Pauses TUI, displays conflicts, prompts user.

func (*InteractiveSyncHandler) Resume

func (h *InteractiveSyncHandler) Resume()

Resume restores the TUI after Pause. Implements rerere.Pauser.

func (*InteractiveSyncHandler) Start

func (h *InteractiveSyncHandler) Start(totalOps int)

Start is called at the beginning of sync

type InteractiveTrackHandler

type InteractiveTrackHandler struct {
	SimpleTrackHandler
}

InteractiveTrackHandler provides interactive prompts for track operations

func NewInteractiveTrackHandler

func NewInteractiveTrackHandler(out output.Output) *InteractiveTrackHandler

NewInteractiveTrackHandler creates a new InteractiveTrackHandler

func (*InteractiveTrackHandler) IsInteractive

func (h *InteractiveTrackHandler) IsInteractive() bool

IsInteractive returns true for interactive handler

func (*InteractiveTrackHandler) PromptSelectParent

func (h *InteractiveTrackHandler) PromptSelectParent(ctx context.Context, eng engine.Engine, ghClient github.Client, logger output.Logger, branchName string) (string, error)

PromptSelectParent prompts user to select a parent for the branch

func (*InteractiveTrackHandler) PromptTrackChild

func (h *InteractiveTrackHandler) PromptTrackChild(childName, parentName string) (bool, error)

PromptTrackChild prompts user to confirm tracking a child branch

type InteractiveUntrackHandler

type InteractiveUntrackHandler struct {
	SimpleUntrackHandler
}

InteractiveUntrackHandler provides interactive prompts for untrack operations

func NewInteractiveUntrackHandler

func NewInteractiveUntrackHandler(out output.Output) *InteractiveUntrackHandler

NewInteractiveUntrackHandler creates a new InteractiveUntrackHandler

func (*InteractiveUntrackHandler) IsInteractive

func (h *InteractiveUntrackHandler) IsInteractive() bool

IsInteractive returns true for interactive handler

func (*InteractiveUntrackHandler) PromptConfirmUntrackDescendants

func (h *InteractiveUntrackHandler) PromptConfirmUntrackDescendants(branchName string, descendantCount int) (bool, error)

PromptConfirmUntrackDescendants prompts user to confirm untracking descendants

type SimpleAbortHandler

type SimpleAbortHandler struct {
	common.BaseHandler
}

SimpleAbortHandler provides non-interactive handling for abort operations

func NewSimpleAbortHandler

func NewSimpleAbortHandler(out output.Output) *SimpleAbortHandler

NewSimpleAbortHandler creates a new SimpleAbortHandler

func (*SimpleAbortHandler) PromptConfirmAbort

func (h *SimpleAbortHandler) PromptConfirmAbort() (bool, error)

PromptConfirmAbort returns false for simple handler (non-interactive) In non-interactive mode, require --force flag to abort

type SimpleFlattenHandler

type SimpleFlattenHandler struct {
	common.BaseHandler
	// contains filtered or unexported fields
}

SimpleFlattenHandler provides streaming text output for flatten operations

func NewSimpleFlattenHandler

func NewSimpleFlattenHandler(out output.Output) *SimpleFlattenHandler

NewSimpleFlattenHandler creates a new SimpleFlattenHandler

func (*SimpleFlattenHandler) Complete

func (h *SimpleFlattenHandler) Complete(_ flatten.Result)

Complete is called when flatten finishes

func (*SimpleFlattenHandler) OnBranchMoved

func (h *SimpleFlattenHandler) OnBranchMoved(_, _, _ string)

OnBranchMoved is called when a branch is moved to a new parent

func (*SimpleFlattenHandler) OnStep

OnStep is called for each step in the flatten process

func (*SimpleFlattenHandler) OnValidationProgress

func (h *SimpleFlattenHandler) OnValidationProgress(_, _ int, _ string)

OnValidationProgress is called during branch validation to report progress

func (*SimpleFlattenHandler) PromptConfirmFlatten

func (h *SimpleFlattenHandler) PromptConfirmFlatten(_ flatten.Preview) (bool, error)

PromptConfirmFlatten returns true (auto-confirm) for simple handler (non-interactive)

func (*SimpleFlattenHandler) Start

func (h *SimpleFlattenHandler) Start(branchCount int)

Start is called at the beginning of flatten

type SimpleForeachHandler

type SimpleForeachHandler struct {
	common.BaseHandler
	// contains filtered or unexported fields
}

SimpleForeachHandler implements foreach.Handler with line-by-line output

func NewSimpleForeachHandler

func NewSimpleForeachHandler(out output.Output, parallel bool) *SimpleForeachHandler

NewSimpleForeachHandler creates a new simple foreach handler

func (*SimpleForeachHandler) OnEvent

func (h *SimpleForeachHandler) OnEvent(e foreach.Event)

OnEvent handles events from the foreach action

type SimpleMoveHandler

type SimpleMoveHandler struct {
	common.BaseHandler
	// contains filtered or unexported fields
}

SimpleMoveHandler provides streaming text output for move operations

func NewSimpleMoveHandler

func NewSimpleMoveHandler(out output.Output) *SimpleMoveHandler

NewSimpleMoveHandler creates a new SimpleMoveHandler

func (*SimpleMoveHandler) Complete

func (h *SimpleMoveHandler) Complete(_ move.Result)

Complete is called when move finishes

func (*SimpleMoveHandler) OnRename

func (h *SimpleMoveHandler) OnRename(oldName, newName string)

OnRename is called when a branch is renamed due to scope change

func (*SimpleMoveHandler) OnStep

func (h *SimpleMoveHandler) OnStep(_ move.Step, _ handler.StepStatus, _ string)

OnStep is called for each step in the move process

func (*SimpleMoveHandler) PromptConfirmMove

func (h *SimpleMoveHandler) PromptConfirmMove(_ move.Preview) (bool, error)

PromptConfirmMove returns true (auto-confirm) for simple handler (non-interactive)

func (*SimpleMoveHandler) PromptRename

func (h *SimpleMoveHandler) PromptRename(_, oldScope, newScope string) (bool, error)

PromptRename returns false for simple handler (non-interactive)

func (*SimpleMoveHandler) PromptSelectOnto

func (h *SimpleMoveHandler) PromptSelectOnto(_ *app.Context, _ string) (string, []engine.RebaseSpec, error)

PromptSelectOnto returns error for simple handler (non-interactive).

func (*SimpleMoveHandler) Start

func (h *SimpleMoveHandler) Start(sourceBranch, oldParent, newParent string)

Start is called at the beginning of move

type SimpleNavigationHandler

type SimpleNavigationHandler struct {
	common.BaseHandler
}

SimpleNavigationHandler provides non-interactive handling for navigation operations

func NewSimpleNavigationHandler

func NewSimpleNavigationHandler(out output.Output) *SimpleNavigationHandler

NewSimpleNavigationHandler creates a new SimpleNavigationHandler

func (*SimpleNavigationHandler) PromptSelectBranch

func (h *SimpleNavigationHandler) PromptSelectBranch(_ string, _ []string) (string, error)

PromptSelectBranch returns an empty string for simple handler (non-interactive) The action will return an error listing available branches

type SimplePluckHandler

type SimplePluckHandler struct {
	common.BaseHandler
	// contains filtered or unexported fields
}

SimplePluckHandler provides streaming text output for pluck operations

func NewSimplePluckHandler

func NewSimplePluckHandler(out output.Output) *SimplePluckHandler

NewSimplePluckHandler creates a new SimplePluckHandler

func (*SimplePluckHandler) Complete

func (h *SimplePluckHandler) Complete(_ pluck.Result)

Complete is called when pluck finishes

func (*SimplePluckHandler) OnChildReparented

func (h *SimplePluckHandler) OnChildReparented(_, _, _ string)

OnChildReparented is called when a child is reparented

func (*SimplePluckHandler) OnStep

OnStep is called for each step in the pluck process

func (*SimplePluckHandler) PromptConfirmPluck

func (h *SimplePluckHandler) PromptConfirmPluck(_ pluck.Preview) (bool, error)

PromptConfirmPluck returns true (auto-confirm) for simple handler (non-interactive)

func (*SimplePluckHandler) Start

func (h *SimplePluckHandler) Start(sourceBranch, oldParent, newParent string)

Start is called at the beginning of pluck

type SimpleScopeHandler

type SimpleScopeHandler struct {
	common.BaseHandler
}

SimpleScopeHandler provides non-interactive handling for scope operations

func NewSimpleScopeHandler

func NewSimpleScopeHandler(out output.Output) *SimpleScopeHandler

NewSimpleScopeHandler creates a new SimpleScopeHandler

func (*SimpleScopeHandler) PromptConfirmRename

func (h *SimpleScopeHandler) PromptConfirmRename(_, oldScope, newScope string) (bool, error)

PromptConfirmRename returns false for simple handler (non-interactive)

type SimpleSubmitHandler

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

SimpleSubmitHandler implements submit.Handler with line-by-line output

func NewSimpleSubmitHandler

func NewSimpleSubmitHandler(splog output.Output) *SimpleSubmitHandler

NewSimpleSubmitHandler creates a new simple submit handler

func (*SimpleSubmitHandler) Confirm

func (h *SimpleSubmitHandler) Confirm(_ string, defaultYes bool) (bool, error)

Confirm prompts for confirmation - in non-TTY mode, uses default

func (*SimpleSubmitHandler) IsInteractive

func (h *SimpleSubmitHandler) IsInteractive() bool

IsInteractive returns false - simple handler is not interactive.

func (*SimpleSubmitHandler) OnEvent

func (h *SimpleSubmitHandler) OnEvent(e submit.Event)

OnEvent handles events from the submit action

type SimpleSyncHandler

type SimpleSyncHandler struct {
	common.BaseHandler
	// contains filtered or unexported fields
}

SimpleSyncHandler provides streaming text output for non-TTY environments

func NewSimpleSyncHandler

func NewSimpleSyncHandler(out output.Output) *SimpleSyncHandler

NewSimpleSyncHandler creates a new SimpleSyncHandler

func (*SimpleSyncHandler) Cleanup

func (h *SimpleSyncHandler) Cleanup()

Cleanup implements Handler. No-op for non-TTY handler.

func (*SimpleSyncHandler) Complete

func (h *SimpleSyncHandler) Complete(summary syncAction.Summary)

Complete is called when sync finishes

func (*SimpleSyncHandler) EmitEvent

func (h *SimpleSyncHandler) EmitEvent(event syncAction.Event)

EmitEvent handles progress updates

func (*SimpleSyncHandler) IsInteractive

func (h *SimpleSyncHandler) IsInteractive() bool

IsInteractive implements Handler. Returns false for non-TTY handler.

func (*SimpleSyncHandler) OnRestackBranch

func (h *SimpleSyncHandler) OnRestackBranch(branch string, result syncAction.RestackResult, newRev string, prNumber *int, lockReason engine.LockReason, frozen bool, isCurrent bool, parent string, reparented bool, oldParent, newParent string, rerereResolvedCount int)

OnRestackBranch implements RestackHandler for standalone restack operations

func (*SimpleSyncHandler) OnRestackComplete

func (h *SimpleSyncHandler) OnRestackComplete(restacked, skipped int, conflicts []string)

OnRestackComplete implements RestackHandler for standalone restack operations

func (*SimpleSyncHandler) OnRestackStart

func (h *SimpleSyncHandler) OnRestackStart(_ int)

OnRestackStart implements RestackHandler for standalone restack operations

func (*SimpleSyncHandler) PromptBranchDeletions

func (h *SimpleSyncHandler) PromptBranchDeletions(branches map[string]string, unpushedBranches map[string]bool) (map[string]bool, error)

PromptBranchDeletions implements Handler. In non-interactive mode, skips unpushed branches and auto-confirms the rest.

func (*SimpleSyncHandler) PromptMetadataConflict

func (h *SimpleSyncHandler) PromptMetadataConflict(diff *engine.MetadataDiff) (bool, error)

PromptMetadataConflict implements Handler. Logs warning and returns false (keep local) in non-interactive mode.

func (*SimpleSyncHandler) PromptOrphanedMetadata

func (h *SimpleSyncHandler) PromptOrphanedMetadata(info engine.OrphanedMetadataInfo) (bool, error)

PromptOrphanedMetadata implements Handler. Logs warning and returns false (accept deletion) in non-interactive mode.

func (*SimpleSyncHandler) PromptResolveConflicts

func (h *SimpleSyncHandler) PromptResolveConflicts(_ []string) (bool, error)

PromptResolveConflicts implements Handler. In non-interactive mode, skips conflicts.

func (*SimpleSyncHandler) Start

func (h *SimpleSyncHandler) Start(totalOps int)

Start is called at the beginning of sync

type SimpleTrackHandler

type SimpleTrackHandler struct {
	common.BaseHandler
}

SimpleTrackHandler provides non-interactive handling for track operations

func NewSimpleTrackHandler

func NewSimpleTrackHandler(out output.Output) *SimpleTrackHandler

NewSimpleTrackHandler creates a new SimpleTrackHandler

func (*SimpleTrackHandler) PromptSelectParent

func (h *SimpleTrackHandler) PromptSelectParent(_ context.Context, _ engine.Engine, _ github.Client, _ output.Logger, _ string) (string, error)

PromptSelectParent returns empty string for simple handler (non-interactive)

func (*SimpleTrackHandler) PromptTrackChild

func (h *SimpleTrackHandler) PromptTrackChild(_, _ string) (bool, error)

PromptTrackChild returns false for simple handler (auto-skip)

type SimpleUntrackHandler

type SimpleUntrackHandler struct {
	common.BaseHandler
}

SimpleUntrackHandler provides non-interactive handling for untrack operations

func NewSimpleUntrackHandler

func NewSimpleUntrackHandler(out output.Output) *SimpleUntrackHandler

NewSimpleUntrackHandler creates a new SimpleUntrackHandler

func (*SimpleUntrackHandler) PromptConfirmUntrackDescendants

func (h *SimpleUntrackHandler) PromptConfirmUntrackDescendants(_ string, _ int) (bool, error)

PromptConfirmUntrackDescendants returns true for simple handler (auto-confirm)

Directories

Path Synopsis
Package merge provides CLI commands for merging stacked PRs.
Package merge provides CLI commands for merging stacked PRs.

Jump to

Keyboard shortcuts

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