fix(git): add git.base_branch config to replace hardcoded main target
Adds `git.base_branch` config option that controls the target branch for PRs and merges. When unset, auto-detects from origin/HEAD and falls back to "main". This fixes projects using `master`, `develop`, or any other default branch — previously `/gsd:ship` would create PRs targeting `main` (which may not exist) and `/gsd:complete-milestone` would try to checkout `main` and fail. Changes: - config.cjs: add git.base_branch to valid config keys - planning-config.md: document the option with auto-detect behavior - ship.md: detect base branch at init, use in PR create, branch detection, push report, and completion report - complete-milestone.md: detect base branch, use for squash merge and merge-with-history checkout targets - 1 new test for config-set git.base_branch Usage: gsd-tools config-set git.base_branch master Or auto-detect (default — reads origin/HEAD): git.base_branch: null Closes #1466 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -23,7 +23,7 @@ const VALID_CONFIG_KEYS = new Set([
|
||||
'workflow.skip_discuss',
|
||||
'workflow._auto_chain_active',
|
||||
'workflow.use_worktrees',
|
||||
'git.branching_strategy', 'git.phase_branch_template', 'git.milestone_branch_template', 'git.quick_branch_template',
|
||||
'git.branching_strategy', 'git.base_branch', 'git.phase_branch_template', 'git.milestone_branch_template', 'git.quick_branch_template',
|
||||
'planning.commit_docs', 'planning.search_gitignored',
|
||||
'hooks.context_warnings',
|
||||
'project_code', 'phase_naming',
|
||||
|
||||
Reference in New Issue
Block a user