chore: update src/lib/stack-rebase.ts

swadhinbiswas committed 8 months ago
928b01f
1 parent 1e3f0ef
commit 928b01f
1 file changed
+9 -2
Showing 1 changed file+9-2
▼src/lib/stack-rebase.ts
+9-2
137
137
* Auto-update a stack when its base branch changes
138
138
*/
139
139
export async function autoUpdateStack(stackId: string): Promise<RebaseResult> {
140
- // For now, auto-update is the same as rebase
141
- // Could be enhanced to use merge instead of rebase
140
+ const { needsRebase } = await stackNeedsRebase(stackId);
141
+ if (!needsRebase) {
142
+ return {
143
+ success: true,
144
+ rebased: [],
145
+ failed: [],
146
+ conflicts: [],
147
+ };
148
+ }
142
149
return rebaseStack(stackId);
143
150
}
144
151
145
152