Versions in this module Expand all Collapse all v0 v0.17.15 May 11, 2026 v0.17.14 May 11, 2026 Changes in this version + const CIRegistrationDelay + const DefaultCIPollInterval + const DefaultCITimeout + func Action(ctx *app.Context, opts Options) error + func AllBranchesAreLeaves(graph *engine.StackGraph, branches []BranchMergeInfo) bool + func AnalyzeMidStackScope(eng engine.Engine, plan *Plan, currentScope string) []string + func AnyPRHasChecks(branches []BranchMergeInfo) bool + func CreateMergePlan(ctx context.Context, eng mergePlanEngine, splog output.Output, ...) (*Plan, *PlanValidation, error) + func Execute(ctx *app.Context, eng mergeExecuteEngine, opts ExecuteOptions) error + func ExecuteInWorktree(ctx *app.Context, eng mergeExecuteEngine, opts ExecuteOptions, scope string, ...) (err error) + func FormatMergePlan(plan *Plan, validation *PlanValidation) string + func FormatStackLabel(stack MultiStackInfo) string + func FormatValidationError(errors, warnings []string) error + func FormatValidationSection(result *strings.Builder, validation *PlanValidation) + func GenerateMultiStackBranchName() string + func GetAvailableScopes(eng engine.Engine) []string + func GetMergeMethod(ctx *app.Context, githubClient github.Client) (github.MergeMethod, error) + func HandlePostMerge(ctx *app.Context, handler InteractiveHandler) error + func IsSingleBranchLeafMerge(plan *Plan, graph *engine.StackGraph) bool + func RunWizard(ctx *app.Context, handler InteractiveHandler, opts WizardOptions) error + type BranchMergeInfo struct + BranchName string + ChecksStatus ChecksStatus + IsDraft bool + MatchesRemote bool + PRNumber int + PRURL string + func (b BranchMergeInfo) HasChecks() bool + type CIWaiter struct + func NewCIWaiter(opts CIWaiterOptions) *CIWaiter + func (w *CIWaiter) SetProgressHandler(handler EventHandler, stepIndex int) + func (w *CIWaiter) WaitAndMerge(ctx context.Context, branchName string, pr *github.PullRequestInfo, ...) error + func (w *CIWaiter) WaitForChecks(ctx context.Context, branchName string, prNumber int, expectChecks bool) (*WaitResult, error) + type CIWaiterOptions struct + Client github.Client + Output output.Output + PollInterval time.Duration + Timeout time.Duration + type ChecksStatus string + const ChecksFailing + const ChecksNone + const ChecksPassing + const ChecksPending + type CollectedBranches struct + BranchesToMerge []BranchMergeInfo + CurrentBranch string + UpstackBranches []string + Validation *PlanValidation + func CollectMergeBranches(ctx context.Context, eng mergePlanEngine, splog output.Output, ...) (*CollectedBranches, error) + type ConsolidateMergeExecutor struct + func NewConsolidateMergeExecutor(plan *Plan, engine mergeExecuteEngine, ctx *app.Context) *ConsolidateMergeExecutor + func (c *ConsolidateMergeExecutor) Execute(ctx context.Context, opts ExecuteOptions) (*ConsolidationResult, error) + func (c *ConsolidateMergeExecutor) SetProgressHandler(handler EventHandler, stepIndex int) + type ConsolidationResult struct + BranchName string + PRNumber int + PRURL string + type CreatePlanOptions struct + Force bool + Scope string + Strategy Strategy + TargetBranch string + Wait bool + type Event struct + Checks []github.CheckDetail + Elapsed time.Duration + Error error + EstimatedDuration time.Duration + Message string + Phase Phase + Step *PlanStep + StepIndex int + Timeout time.Duration + Type EventType + type EventHandler interface + Cleanup func() + Complete func(result *Result) + EmitEvent func(event Event) + Start func(plan *Plan) + type EventType string + const EventCompleted + const EventFailed + const EventProgress + const EventSkipped + const EventStarted + const EventWaiting + type ExecuteOptions struct + ConsolidationResultFunc func(*ConsolidationResult) + Force bool + Handler EventHandler + MergeMethod github.MergeMethod + Plan *Plan + Strategy Strategy + UndoStackDepth int + Wait bool + type IndividualMergeStatus struct + BlockingReason string + CanMerge bool + MergeableState map[string]bool + func CanMergeIndividually(ctx context.Context, gitRunner git.Runner, githubClient github.Client, ...) (*IndividualMergeStatus, error) + type InteractiveHandler interface + IsInteractive func() bool + PromptConfirm func(message string, defaultYes bool) (bool, error) + PromptMergeType func(canMergeThisBranch bool, availableScopes []string, ...) (MergeType, error) + PromptPostMerge func(hasUncommittedChanges bool, trunkName string) (PostMergeAction, error) + PromptScope func(availableScopes []string) (string, error) + PromptSimpleMergeConfirm func(branch BranchMergeInfo, baseBranch string) (bool, error) + PromptStacks func(availableStacks []MultiStackInfo) ([]string, error) + PromptStrategy func(plan *Plan, recommended Strategy) (StrategyChoice, error) + ShowMidStackWarning func(scope string, upstackBranchesInScope []string) + ShowPlan func(plan *Plan, validation *PlanValidation) + type LocalCISearchResult struct + FailedStacks []MultiStackExcluded + WorkingStacks []MultiStackInfo + func FindLargestWorkingSet(ctx context.Context, validator *LocalCIValidator, ...) (*LocalCISearchResult, error) + type LocalCIValidator struct + Command string + Timeout time.Duration + func NewLocalCIValidator(cfg config.Configurer, out output.Output) *LocalCIValidator + func (v *LocalCIValidator) IsConfigured() bool + func (v *LocalCIValidator) Validate(ctx context.Context, workdir string) error + type MergeType string + const MergeTypeScope + const MergeTypeStacks + const MergeTypeThis + type MultiStackExcluded struct + Reason string + Stack MultiStackInfo + type MultiStackInfo struct + AllBranches []string + PRCount int + RootBranch string + Scope string + func DiscoverStacks(eng engine.BranchReader) ([]MultiStackInfo, error) + func DiscoverStacksWithSort(eng engine.BranchReader, strategy engine.SortStrategy) ([]MultiStackInfo, error) + func FilterStacks(stacks []MultiStackInfo, selectedRoots []string) []MultiStackInfo + type MultiStackOptions struct + SelectedStacks []string + SkipLocalCI bool + Wait bool + type MultiStackPRCreator struct + func NewMultiStackPRCreator(ctx *app.Context, worktreeEng engine.Engine, worktreePath string) *MultiStackPRCreator + func (p *MultiStackPRCreator) BuildStackMetadata(included []MultiStackInfo) pr.StackMetadata + func (p *MultiStackPRCreator) CreateAndPushBranch(ctx context.Context, branchName string) error + func (p *MultiStackPRCreator) CreatePR(ctx context.Context, branchName string, included []MultiStackInfo, ...) (*github.PullRequestInfo, error) + func (p *MultiStackPRCreator) EnableAutoMerge(ctx context.Context, pr *github.PullRequestInfo, commitBody string) error + func (p *MultiStackPRCreator) WaitAndMerge(ctx context.Context, branchName string, pr *github.PullRequestInfo, ...) error + type MultiStackResult struct + BranchName string + ExcludedStacks []MultiStackExcluded + IncludedStacks []MultiStackInfo + PRNumber int + PRURL string + func ExecuteMultiStack(ctx *app.Context, opts MultiStackOptions) (*MultiStackResult, error) + type MultiStackWorktreeExecutor struct + func NewMultiStackWorktreeExecutor(eng engine.Engine, out output.Output) *MultiStackWorktreeExecutor + func (w *MultiStackWorktreeExecutor) ExecuteInWorktree(ctx context.Context, stacks []MultiStackInfo) (*MultiStackWorktreeResult, error) + func (w *MultiStackWorktreeExecutor) ResetToTrunk(ctx context.Context, eng engine.Engine) error + type MultiStackWorktreeResult struct + Cleanup func() + ConflictStacks []MultiStackExcluded + MergedStacks []MultiStackInfo + WorktreeEngine engine.Engine + WorktreePath string + type NullEventHandler struct + func (h *NullEventHandler) Cleanup() + func (h *NullEventHandler) Complete(_ *Result) + func (h *NullEventHandler) EmitEvent(_ Event) + func (h *NullEventHandler) Start(_ *Plan) + type Options struct + Confirm bool + DryRun bool + Force bool + Handler EventHandler + MergeMethod github.MergeMethod + Plan *Plan + Scope string + Strategy Strategy + TargetBranch string + UndoStackDepth int + Wait bool + type PRCleaner struct + func NewPRCleaner(ctx *app.Context, eng prCleanupEngine, config PRCleanupConfig) *PRCleaner + func (c *PRCleaner) CleanupBranches(ctx context.Context, branchNames []string) PRCleanupResult + func (c *PRCleaner) LogResult(result PRCleanupResult) + type PRCleanupConfig struct + ConsolidationPRNumber int + Source PRCleanupSource + UserName string + type PRCleanupResult struct + ClosedPRs []int + FailedPRs []int + SkippedPRs []int + func (r PRCleanupResult) ClosedCount() int + func (r PRCleanupResult) FailedCount() int + func (r PRCleanupResult) SkippedCount() int + type PRCleanupSource string + const CleanupSourceConsolidate + const CleanupSourceMultiStack + type PRContentGenerator struct + func NewPRContentGenerator(engine interface{ ... }) *PRContentGenerator + func (g *PRContentGenerator) GenerateConsolidationPR(branches []BranchMergeInfo) pr.Content + func (g *PRContentGenerator) GenerateMultiStackPR(included []MultiStackInfo, excluded []MultiStackExcluded) pr.Content + type Phase string + const PhaseCleanup + const PhaseComplete + const PhaseMerge + const PhasePlan + const PhaseRestack + const PhaseWaiting + type Plan struct + BranchesToMerge []BranchMergeInfo + CreatedAt time.Time + CurrentBranch string + Infos []string + Steps []PlanStep + Strategy Strategy + UpstackBranches []string + Warnings []string + func BuildMergePlan(collected *CollectedBranches, strategy Strategy, wait bool) *Plan + type PlanStep struct + BranchName string + Description string + ExpectChecks bool + PRNumber int + StepType StepType + WaitTimeout time.Duration + type PlanValidation struct + Errors []string + Infos []string + Valid bool + Warnings []string + type PostMergeAction string + const PostMergeDone + const PostMergeSyncTrunk + type PostMergeActionRequired struct + Action PostMergeAction + func (e *PostMergeActionRequired) Error() string + type Result struct + ConsolidationResult *ConsolidationResult + Error error + Success bool + type StepType string + const StepConsolidate + const StepDeleteBranch + const StepMergePR + const StepPullTrunk + const StepRestack + const StepUpdatePRBase + const StepWaitCI + type Strategy string + const StrategyBottomUp + const StrategyShip + func DetermineRecommendedStrategy(branchCount int) Strategy + type StrategyChoice struct + Strategy Strategy + Wait bool + type WaitResult struct + MaxDuration time.Duration + Passed bool + type WizardOptions struct + DryRun bool + Force bool + Scope string + Strategy Strategy + TargetBranch string + Wait bool