Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ func runInit(cfg *config.Config, opts *initOptions) error {
}
}
} else {
syncStackPRs(cfg, latestStack)
_ = syncStackPRs(cfg, latestStack)
}

if err := stack.Save(gitDir, sf); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion cmd/merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func runMerge(cfg *config.Config, target string) error {
currentBranch := result.CurrentBranch

// Sync PR state from GitHub so merge status is up to date.
syncStackPRs(cfg, s)
_ = syncStackPRs(cfg, s)

// Persist the refreshed PR state.
stack.SaveNonBlocking(result.GitDir, result.StackFile)
Expand Down
11 changes: 9 additions & 2 deletions cmd/modify.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func runModify(cfg *config.Config) error {
currentBranch := result.CurrentBranch

// Load branch data for the TUI
viewNodes := stackview.LoadBranchNodes(cfg, s, currentBranch)
viewNodes := stackview.LoadBranchNodes(cfg, s, currentBranch, result.PRDetails)

// Reverse so index 0 = top of stack (matching visual order)
reversed := make([]stackview.BranchNode, len(viewNodes))
Expand Down Expand Up @@ -283,8 +283,15 @@ func checkModifyPreconditions(cfg *config.Config) (*loadStackResult, error) {
return nil, ErrSilent
}

// Show loading indicator while syncing PRs
fmt.Fprintf(cfg.Err, "Loading stack...")

// Sync PR state and check merge queue
syncStackPRs(cfg, s)
prDetails := syncStackPRs(cfg, s)
result.PRDetails = prDetails

fmt.Fprintf(cfg.Err, "\r\033[2K")

if err := modify.CheckNoMergeQueuePRs(cfg, s); err != nil {
return nil, ErrSilent
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func runPush(cfg *config.Config, opts *pushOptions) error {
return ErrSilent
}
// Sync PR state to detect merged/queued PRs before pushing.
syncStackPRs(cfg, s)
_ = syncStackPRs(cfg, s)

merged := s.MergedBranches()
if len(merged) > 0 {
Expand Down
6 changes: 3 additions & 3 deletions cmd/rebase.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func runRebase(cfg *config.Config, opts *rebaseOptions) error {
branchesToRebase[0].Branch, branchesToRebase[len(branchesToRebase)-1].Branch)

// Sync PR state before rebase so we can detect merged PRs.
syncStackPRs(cfg, s)
_ = syncStackPRs(cfg, s)

branchNames := make([]string, 0, len(s.Branches))
for _, b := range s.Branches {
Expand Down Expand Up @@ -349,7 +349,7 @@ func runRebase(cfg *config.Config, opts *rebaseOptions) error {

updateBaseSHAs(s)

syncStackPRs(cfg, s)
_ = syncStackPRs(cfg, s)

stack.SaveNonBlocking(gitDir, sf)

Expand Down Expand Up @@ -540,7 +540,7 @@ func continueRebase(cfg *config.Config, gitDir string) error {

updateBaseSHAs(s)

syncStackPRs(cfg, s)
_ = syncStackPRs(cfg, s)

stack.SaveNonBlocking(gitDir, sf)

Expand Down
4 changes: 2 additions & 2 deletions cmd/submit.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func runSubmit(cfg *config.Config, opts *submitOptions) error {
}

// Sync PR state to detect merged/queued PRs before pushing.
syncStackPRs(cfg, s)
_ = syncStackPRs(cfg, s)

// Resolve remote for pushing
remote, err := pickRemote(cfg, currentBranch, opts.remote)
Expand Down Expand Up @@ -189,7 +189,7 @@ func runSubmit(cfg *config.Config, opts *submitOptions) error {

// Update base commit hashes and sync PR state
updateBaseSHAs(s)
syncStackPRs(cfg, s)
_ = syncStackPRs(cfg, s)

if err := stack.Save(gitDir, sf); err != nil {
return handleSaveError(cfg, err)
Expand Down
4 changes: 2 additions & 2 deletions cmd/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func runSync(cfg *config.Config, opts *syncOptions) error {
cfg.Printf("Rebasing stack ...")

// Sync PR state to detect merged PRs before rebasing.
syncStackPRs(cfg, s)
_ = syncStackPRs(cfg, s)

// Save original refs so we can restore on conflict.
// Merged branches that no longer exist locally have no ref to
Expand Down Expand Up @@ -311,7 +311,7 @@ func runSync(cfg *config.Config, opts *syncOptions) error {
// --- Step 5: Sync PR state ---
cfg.Printf("")
cfg.Printf("Syncing PRs ...")
syncStackPRs(cfg, s)
_ = syncStackPRs(cfg, s)

// Report PR status for each branch
for _, b := range s.Branches {
Expand Down
Loading
Loading