Adds command to migrate from v1 to v2 format#263
Merged
geofflamrock merged 3 commits intomainfrom Jun 10, 2025
Merged
Conversation
This was referenced Jun 3, 2025
3347e31 to
fc1dffc
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new stack config migrate command to transition user configuration files from v1 to v2 format.
- Refactors the existing
stack configcommand into a branch withopenand newmigratesubcommands - Updates
StackConfig.Saveto create parent directories and centralize backup file naming - Adds handler, settings, and tests for the migration command, plus README updates
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Stack/Program.cs | Replaces single config command with config open and config migrate subcommands |
| src/Stack/Help/CommandNames.cs | Adds Migrate constant for the new subcommand |
| src/Stack/Config/StackConfig.cs | Ensures config directory exists and introduces GetV1ConfigBackupFilePath() |
| src/Stack/Commands/Config/MigrateConfigCommand.cs | Implements the CLI command and handler for config migration |
| src/Stack.Tests/Config/FileStackConfigTests.cs | Updates tests to use the new backup file path helper |
| src/Stack.Tests/Commands/Config/MigrateConfigCommandTests.cs | Adds basic migration test |
| README.md | Documents the new config open and config migrate usage |
fc1dffc to
9dcde11
Compare
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.
This PR is part of supporting a tree structure with stack, where a branch can have multiple child branches: