MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / runAutoPush

Method runAutoPush

internal/tui/app.go:1397–1408  ·  view source on GitHub ↗

runAutoPush returns a tea.Cmd that pushes the branch in the background.

()

Source from the content-addressed store, hash-verified

1395
1396// runAutoPush returns a tea.Cmd that pushes the branch in the background.
1397func (a *App) runAutoPush() tea.Cmd {
1398 branch := a.completionScreen.Branch()
1399 // Use worktree dir if available, otherwise base dir
1400 dir := a.baseDir
1401 if instance := a.manager.GetInstance(a.completionScreen.PRDName()); instance != nil && instance.WorktreeDir != "" {
1402 dir = instance.WorktreeDir
1403 }
1404 return func() tea.Msg {
1405 err := git.PushBranch(dir, branch)
1406 return autoActionResultMsg{action: "push", err: err}
1407 }
1408}
1409
1410// runAutoCreatePR returns a tea.Cmd that creates a PR in the background.
1411func (a *App) runAutoCreatePR() tea.Cmd {

Callers 1

showCompletionScreenMethod · 0.95

Calls 4

PushBranchFunction · 0.92
BranchMethod · 0.80
GetInstanceMethod · 0.80
PRDNameMethod · 0.80

Tested by

no test coverage detected