Documentation
¶
Index ¶
- func ConfigExists() (bool, error)
- func Run(args []string) error
- func SaveConfig(cfg Config) error
- type Config
- type GHManager
- type LockManager
- func (m *LockManager) Acquire(repoRoot string, worktreePath string) (*WorktreeLock, error)
- func (m *LockManager) AcquireForPID(repoRoot string, worktreePath string, pid int) (*WorktreeLock, error)
- func (m *LockManager) ForceUnlock(repoRoot string, worktreePath string) error
- func (m *LockManager) IsAvailable(repoRoot string, worktreePath string) (bool, error)
- func (m *LockManager) ReleaseIfOwned(repoRoot string, worktreePath string) error
- type PRCIState
- type PRData
- type RunResult
- type Runner
- type WorktreeInfo
- type WorktreeLock
- type WorktreeManager
- func (m *WorktreeManager) AcquireWorktreeLock(worktreePath string) (*WorktreeLock, error)
- func (m *WorktreeManager) CanDeleteWorktree(path string) error
- func (m *WorktreeManager) CheckoutExistingBranch(worktreePath string, branch string) error
- func (m *WorktreeManager) CheckoutNewBranch(worktreePath string, branch string, baseRef string, doFetch bool) error
- func (m *WorktreeManager) CreateWorktree(branch string, baseRef string) (WorktreeInfo, error)
- func (m *WorktreeManager) CreateWorktreeFromBranch(branch string) (WorktreeInfo, error)
- func (m *WorktreeManager) DeleteWorktree(path string, force bool) error
- func (m *WorktreeManager) FetchRepo() error
- func (m *WorktreeManager) FetchRepoBaseRef(baseRef string) error
- func (m *WorktreeManager) ListAllLocalBranchesByRecentUse() ([]string, error)
- func (m *WorktreeManager) ListForStatusBase() WorktreeStatus
- func (m *WorktreeManager) ListLocalBranchesByRecentUse() ([]string, error)
- func (m *WorktreeManager) ResolveBaseRefForNewBranch() string
- func (m *WorktreeManager) UnlockWorktree(worktreePath string) error
- type WorktreeOrchestrator
- func (o *WorktreeOrchestrator) PRDataForBranchesWithError(repoRoot string, branches []string, force bool) (map[string]PRData, error)
- func (o *WorktreeOrchestrator) PRDataForStatusWithError(status WorktreeStatus, force bool) (map[string]PRData, error)
- func (o *WorktreeOrchestrator) ResolveOpenTargetSlot(slots []openSlotState, targetBranch string, targetIsNew bool) (openSlotState, bool)
- func (o *WorktreeOrchestrator) Status() WorktreeStatus
- type WorktreeStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigExists ¶
func SaveConfig ¶
Types ¶
type Config ¶
type Config struct {
AgentCommand string `json:"agent_command"`
NewBranchBaseRef string `json:"new_branch_base_ref,omitempty"`
NewBranchFetchFirst *bool `json:"new_branch_fetch_first,omitempty"`
IDECommand string `json:"ide_command,omitempty"`
MainScreenBranchLimit int `json:"main_screen_branch_limit,omitempty"`
}
func LoadConfig ¶
type GHManager ¶
type GHManager struct {
// contains filtered or unexported fields
}
func NewGHManager ¶
func NewGHManager() *GHManager
func (*GHManager) PRDataByBranch ¶
type LockManager ¶
type LockManager struct {
// contains filtered or unexported fields
}
func NewLockManager ¶
func NewLockManager() *LockManager
func (*LockManager) Acquire ¶
func (m *LockManager) Acquire(repoRoot string, worktreePath string) (*WorktreeLock, error)
func (*LockManager) AcquireForPID ¶
func (m *LockManager) AcquireForPID(repoRoot string, worktreePath string, pid int) (*WorktreeLock, error)
func (*LockManager) ForceUnlock ¶
func (m *LockManager) ForceUnlock(repoRoot string, worktreePath string) error
func (*LockManager) IsAvailable ¶
func (m *LockManager) IsAvailable(repoRoot string, worktreePath string) (bool, error)
func (*LockManager) ReleaseIfOwned ¶
func (m *LockManager) ReleaseIfOwned(repoRoot string, worktreePath string) error
type PRData ¶
type PRData struct {
Number int
URL string
Branch string
Status string
ReviewDecision string
Approved bool
ReviewApproved int
ReviewRequired int
ReviewKnown bool
UnresolvedComments int
ResolvedComments int
CommentThreadsTotal int
CIState PRCIState
CIRequired bool
CICompleted int
CITotal int
CIFailingNames string
CommentsRequired bool
CommentsKnown bool
BaseStatus string
}
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
func NewRunner ¶
func NewRunner(lockMgr *LockManager) *Runner
func (*Runner) RunInWorktree ¶
func (*Runner) RunShellInWorktree ¶
type WorktreeInfo ¶
type WorktreeInfo struct {
Path string
Branch string
Available bool
LastUsedUnix int64
PRURL string
PRNumber int
HasPR bool
PRStatus string
CIState PRCIState
CIDone int
CITotal int
CIFailingNames string
Approved bool
ReviewApproved int
ReviewRequired int
ReviewKnown bool
UnresolvedComments int
ResolvedComments int
CommentThreadsTotal int
CommentsKnown bool
}
type WorktreeLock ¶
type WorktreeLock struct {
// contains filtered or unexported fields
}
func (*WorktreeLock) RebindPID ¶
func (l *WorktreeLock) RebindPID(pid int) error
func (*WorktreeLock) Release ¶
func (l *WorktreeLock) Release()
type WorktreeManager ¶
type WorktreeManager struct {
// contains filtered or unexported fields
}
func NewWorktreeManager ¶
func NewWorktreeManager(cwd string, lockMgr *LockManager) *WorktreeManager
func (*WorktreeManager) AcquireWorktreeLock ¶
func (m *WorktreeManager) AcquireWorktreeLock(worktreePath string) (*WorktreeLock, error)
func (*WorktreeManager) CanDeleteWorktree ¶
func (m *WorktreeManager) CanDeleteWorktree(path string) error
func (*WorktreeManager) CheckoutExistingBranch ¶
func (m *WorktreeManager) CheckoutExistingBranch(worktreePath string, branch string) error
func (*WorktreeManager) CheckoutNewBranch ¶
func (*WorktreeManager) CreateWorktree ¶
func (m *WorktreeManager) CreateWorktree(branch string, baseRef string) (WorktreeInfo, error)
func (*WorktreeManager) CreateWorktreeFromBranch ¶
func (m *WorktreeManager) CreateWorktreeFromBranch(branch string) (WorktreeInfo, error)
func (*WorktreeManager) DeleteWorktree ¶
func (m *WorktreeManager) DeleteWorktree(path string, force bool) error
func (*WorktreeManager) FetchRepo ¶
func (m *WorktreeManager) FetchRepo() error
func (*WorktreeManager) FetchRepoBaseRef ¶ added in v0.0.61
func (m *WorktreeManager) FetchRepoBaseRef(baseRef string) error
func (*WorktreeManager) ListAllLocalBranchesByRecentUse ¶ added in v0.0.68
func (m *WorktreeManager) ListAllLocalBranchesByRecentUse() ([]string, error)
func (*WorktreeManager) ListForStatusBase ¶
func (m *WorktreeManager) ListForStatusBase() WorktreeStatus
func (*WorktreeManager) ListLocalBranchesByRecentUse ¶
func (m *WorktreeManager) ListLocalBranchesByRecentUse() ([]string, error)
func (*WorktreeManager) ResolveBaseRefForNewBranch ¶
func (m *WorktreeManager) ResolveBaseRefForNewBranch() string
func (*WorktreeManager) UnlockWorktree ¶
func (m *WorktreeManager) UnlockWorktree(worktreePath string) error
type WorktreeOrchestrator ¶
type WorktreeOrchestrator struct {
// contains filtered or unexported fields
}
func NewWorktreeOrchestrator ¶
func NewWorktreeOrchestrator(mgr *WorktreeManager, lockMgr *LockManager, prMgr *GHManager) *WorktreeOrchestrator
func (*WorktreeOrchestrator) PRDataForBranchesWithError ¶
func (*WorktreeOrchestrator) PRDataForStatusWithError ¶
func (o *WorktreeOrchestrator) PRDataForStatusWithError(status WorktreeStatus, force bool) (map[string]PRData, error)
func (*WorktreeOrchestrator) ResolveOpenTargetSlot ¶
func (o *WorktreeOrchestrator) ResolveOpenTargetSlot(slots []openSlotState, targetBranch string, targetIsNew bool) (openSlotState, bool)
func (*WorktreeOrchestrator) Status ¶
func (o *WorktreeOrchestrator) Status() WorktreeStatus
type WorktreeStatus ¶
type WorktreeStatus struct {
GitInstalled bool
InRepo bool
RepoRoot string
CWD string
HasRemote bool
BaseRef string
Worktrees []WorktreeInfo
Orphaned []WorktreeInfo
Malformed []string
Err error
}
Source Files
¶
- base_ref_resolver.go
- branch_cache.go
- branch_completion.go
- checkout_command.go
- cli.go
- command_picker.go
- completion_command.go
- config.go
- confirm.go
- env_controls.go
- gh_manager.go
- git_utils.go
- ide_picker.go
- init_ui.go
- lock_manager.go
- main.go
- open_new_branch_form.go
- open_screen.go
- pr_command.go
- runner.go
- shell_ide.go
- terminal_manager.go
- tmux_actions_popup.go
- tmux_manager.go
- tmux_status_cmd.go
- ui.go
- ui_update_hint.go
- update_manager.go
- version.go
- worktree_manager.go
- worktree_orchestrator.go
- worktree_types.go
Click to show internal directories.
Click to hide internal directories.