fix(sdk-config): honor legacy top-level branching_strategy in init

This commit is contained in:
Tom Boucher
2026-05-04 23:06:54 -04:00
parent 42ed7cee8d
commit 58062a64a0
3 changed files with 39 additions and 0 deletions

View File

@@ -177,11 +177,16 @@ export async function loadConfig(projectDir: string, workstream?: string): Promi
}
function mergeDefaults(parsed: Record<string, unknown>): GSDConfig {
const legacyBranchingStrategy = typeof parsed.branching_strategy === 'string'
? parsed.branching_strategy
: undefined;
return {
...structuredClone(CONFIG_DEFAULTS),
...parsed,
git: {
...CONFIG_DEFAULTS.git,
...(legacyBranchingStrategy ? { branching_strategy: legacyBranchingStrategy } : {}),
...(parsed.git as Partial<GitConfig> ?? {}),
},
workflow: {