Skip to content

Conversation

@geofflamrock geofflamrock added the minor Increment the minor version when merged label May 28, 2025
@geofflamrock geofflamrock force-pushed the tree-structure branch 8 times, most recently from f13a05b to 541d77e Compare May 29, 2025 09:41
@geofflamrock geofflamrock force-pushed the tree-structure branch 2 times, most recently from b640a5f to 474acfd Compare May 29, 2025 10:13
@geofflamrock geofflamrock requested a review from Copilot June 10, 2025 09:33

This comment was marked as outdated.

@geofflamrock geofflamrock marked this pull request as ready for review June 10, 2025 09:37
@geofflamrock geofflamrock requested a review from Copilot June 10, 2025 09:37
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces support for a tree structure in stack branches by replacing the old flat branch representations with a nested structure using the new Config.Branch type. Key changes include removal of the temporary directory implementation from one helper file, refactoring of test data builders to use a new TestStackConfigBuilder with nested branch objects, and updates to various tests to account for the new hierarchical branch design.

Reviewed Changes

Copilot reviewed 44 out of 44 changed files in this pull request and generated no comments.

File Description
src/Stack.Tests/Helpers/TestGitRepositoryBuilder.cs Removed duplicate TemporaryDirectory implementation to improve maintainability.
src/Stack.Tests/Config/FileStackConfigTests.cs Updated test expectations for both V1 and V2 JSON formats to use the new nested branch structure.
Various test files under src/Stack.Tests/Commands/… Refactored test setup to consistently use TestStackConfigBuilder with new Config.Branch objects, supporting the tree structure in stacks.
Comments suppressed due to low confidence (3)

src/Stack.Tests/Helpers/TestGitRepositoryBuilder.cs:398

  • The TemporaryDirectory class has been removed from this file and moved into its own helper file. Please verify that all tests referencing temporary directories now correctly use the new implementation.
    -public class TemporaryDirectory(string DirectoryPath) : IDisposable { ... }

src/Stack.Tests/Config/FileStackConfigTests.cs:61

  • The test now uses new Config.Branch instances with explicit empty child arrays to represent leaf branches. Ensure that both the serialization logic and the equivalence assertions properly handle this nested branch structure in V1 and V2 formats.
            new Config.Stack(stackName, remoteUri, sourceBranch, [ new Config.Branch(branch1, [ new Config.Branch(branch2, []) ]) ]);

src/Stack.Tests/Commands/Stack/UpdateStackCommandHandlerTests.cs:33

  • [nitpick] The refactor to use TestStackConfigBuilder with nested branch definitions improves clarity of test setup. Consider adding a brief comment in the tests to explain the intended tree structure (parent and child branches) for improved future maintainability.
var stackConfig = new TestStackConfigBuilder()

@geofflamrock geofflamrock changed the title Add support for a tree structure in stack branches Add support for tree structure in config file Jun 10, 2025
@geofflamrock geofflamrock merged commit 35f76bb into main Jun 10, 2025
17 checks passed
@geofflamrock geofflamrock deleted the tree-structure branch June 10, 2025 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor Increment the minor version when merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support proper tree structure in config file

1 participant