Documentation
¶
Overview ¶
Package scope implements the stackit scope command for managing branch scopes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Deps ¶ added in v0.30.1
Deps are the collaborators scope needs. Adapters build them from their own runtime state; the action never sees bootstrap types.
type Engine ¶ added in v0.30.1
type Engine interface {
actions.MetadataPushEngine
engine.BranchLookup
CurrentBranch(ctx context.Context) *engine.Branch
Trunk() engine.Branch
GetScope(branch engine.Branch) engine.Scope
SetScopeAndMarkForUpdate(ctx context.Context, branch engine.Branch, scope engine.Scope) error
RenameBranch(ctx context.Context, oldBranch, newBranch engine.Branch) error
}
Engine lists exactly the engine methods scope calls.
type Handler ¶
type Handler interface {
// PromptConfirmRename prompts user to confirm branch rename after scope change
// Returns true to proceed with rename, false to skip
PromptConfirmRename(branchName, oldScope, newScope 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 scope action
type NullHandler ¶
NullHandler is a no-op handler for when nil is passed. It embeds handler.NullBase for Cleanup() and IsInteractive().
func (*NullHandler) PromptConfirmRename ¶
PromptConfirmRename implements Handler. Returns false (skip rename) for null handler.
Click to show internal directories.
Click to hide internal directories.