fix(state): support plain format STATE.md fields in phase/milestone complete#924
Open
j2h4u wants to merge 1 commit intogsd-build:mainfrom
Open
fix(state): support plain format STATE.md fields in phase/milestone complete#924j2h4u wants to merge 1 commit intogsd-build:mainfrom
j2h4u wants to merge 1 commit intogsd-build:mainfrom
Conversation
…omplete `cmdPhaseComplete` and `cmdMilestoneComplete` used hardcoded bold-format regexes like `**Current Phase:**` to update STATE.md, but the template generates plain `Phase:` fields. Switched to `stateReplaceField` with fallback field names to handle both formats. Also preserves compound `Phase: X of Y (Name)` format by parsing the existing value structure before writing updates. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
cmdPhaseCompleteandcmdMilestoneCompletenow usestateReplaceField/stateExtractFieldfromstate.cjswith fallback field names to update STATE.md, handling both**Bold:**and plainField:formats.Why
The STATE.md template generates plain-format fields (
Phase: 1 of 3,Status: In progress), but the code only matched bold-format fields (**Current Phase:**). This causedphase completeandmilestone completeto silently skip all STATE.md updates on projects initialized with the current template.Also preserves the compound
Phase: X of Y (Name)format by parsing the existing value structure before writing.Testing
Checklist
Breaking Changes
None