Improve merge spinner messages and conflict resolution flow
This commit is contained in:
parent
ec1f6796b8
commit
1022a75722
|
|
@ -52,20 +52,23 @@ export async function mergeAndClose(branch: string, opts?: { squash?: boolean })
|
|||
}
|
||||
|
||||
const label = opts?.squash ? "Squash-merged" : "Merged"
|
||||
const spin = spinner("Merging", branch)
|
||||
const conflicts = await git.merge(branch, root, opts?.squash ? { squash: true } : undefined)
|
||||
|
||||
if (conflicts.length === 0) {
|
||||
if (opts?.squash) {
|
||||
spin.text = "Starting container"
|
||||
await vm.ensure((msg) => { spin.text = msg })
|
||||
spin.text = "Generating commit message"
|
||||
await squashCommit(branch, root)
|
||||
}
|
||||
console.log(`✔ ${label} ${branch} into current branch`)
|
||||
spin.succeed(`${label} ${branch} into current branch`)
|
||||
await closeAction(branch)
|
||||
return
|
||||
}
|
||||
|
||||
// Resolve conflicts with Claude
|
||||
console.log(`◆ Merge conflicts in ${conflicts.length} file(s). Resolving with Claude...`)
|
||||
const spin = spinner("Starting container", branch)
|
||||
spin.text = `Resolving ${conflicts.length} conflict(s)`
|
||||
|
||||
try {
|
||||
await vm.ensure((msg) => { spin.text = msg })
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user