Merge pull request #317 from gsd-build/copilot/fix-merge-branch-issue

This commit is contained in:
TÂCHES 2026-03-14 06:13:53 -06:00 committed by GitHub
commit 2af113b46f
2 changed files with 5 additions and 3 deletions

View file

@ -475,8 +475,8 @@ export async function startAuto(
// Capture the integration branch — records the branch the user was on when
// auto-mode started. Slice branches will merge back to this branch instead
// of the repo's default (main/master). Idempotent: only writes if not
// already recorded, so restarts/resumes don't overwrite.
// of the repo's default (main/master). Idempotent when the branch is the
// same; updates the record when started from a different branch (#300).
if (currentMilestoneId) {
captureIntegrationBranch(base, currentMilestoneId);
setActiveMilestoneId(base, currentMilestoneId);

View file

@ -55,7 +55,9 @@ export function setActiveMilestoneId(basePath: string, milestoneId: string | nul
/**
* Record the current branch as the integration branch for a milestone.
* Called once when auto-mode starts captures where slice branches should
* merge back to. No-op if already recorded or if on a GSD slice branch.
* merge back to. No-op if the same branch is already recorded. Updates the
* record when the user starts from a different branch (#300). Always a no-op
* if on a GSD slice branch.
*/
export function captureIntegrationBranch(basePath: string, milestoneId: string): void {
const svc = getService(basePath);