Documentation
¶
Overview ¶
Package track implements the stackit track command for tracking branches in a stack.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Handler ¶
type Handler interface {
// PromptSelectParent prompts user to select a parent for the branch
// Returns the selected parent branch name
PromptSelectParent(ctx context.Context, eng engine.Engine, ghClient github.Client, logger output.Logger, branchName string) (string, error)
// PromptTrackChild prompts user to confirm tracking a child branch
// Returns true to track the child, false to skip
PromptTrackChild(childName, parentName string) (bool, error)
// Cleanup restores terminal state (may be no-op)
Cleanup()
// IsInteractive returns true if the handler supports interactive prompts
IsInteractive() bool
}
Handler receives events from track action
type NullHandler ¶
NullHandler is a no-op handler for when nil is passed
func (*NullHandler) PromptSelectParent ¶
func (h *NullHandler) PromptSelectParent(_ context.Context, _ engine.Engine, _ github.Client, _ output.Logger, _ string) (string, error)
PromptSelectParent implements Handler. Returns empty string for null handler.
func (*NullHandler) PromptTrackChild ¶
func (h *NullHandler) PromptTrackChild(_, _ string) (bool, error)
PromptTrackChild implements Handler. Returns false for null handler.
Click to show internal directories.
Click to hide internal directories.