fix(#1836): count prefixed milestone phase dirs (#1844)

* fix(#1836): count prefixed milestone phase dirs

* chore(#1836): add changeset fragment
This commit is contained in:
Tom Boucher
2026-06-30 20:43:28 -04:00
committed by GitHub
parent 9e32462dd8
commit 88a7500e91
3 changed files with 48 additions and 2 deletions

View File

@@ -64,7 +64,7 @@ const {
extractCurrentMilestone,
} = roadmapParser;
const { pathExistsInternal, generateSlugInternal, toPosixPath } = coreUtils;
const { normalizePhaseName, phaseTokenMatches } = phaseId;
const { normalizePhaseName, phaseTokenMatches, stripProjectCodePrefix } = phaseId;
const { pruneOrphanedWorktrees } = worktreeSafety;
const {
@@ -1204,7 +1204,7 @@ function cmdInitMilestoneOp(cwd: string, raw: boolean): void {
const entries = fs.readdirSync(phasesDir, { withFileTypes: true });
for (const e of entries) {
if (!e.isDirectory()) continue;
const m = e.name.match(/^(\d+[A-Z]?(?:\.\d+)*)/);
const m = stripProjectCodePrefix(e.name).match(/^(\d+[A-Z]?(?:\.\d+)*)/);
if (!m) continue;
diskPhaseDirs.set(canonicalizePhase(m[1]), e.name);
}