Skip to content

Conversation

Base automatically changed from stack-actions-pull to main August 19, 2025 09:50
@geofflamrock geofflamrock requested a review from Copilot August 19, 2025 09:56
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 refactors the push functionality by moving StackHelpers.PushChanges to a separate IStackActions interface to improve testability. This allows commands to be tested without requiring a full Git repository setup, using mock interfaces instead.

Key changes:

  • Extracted PushChanges method from static helper to injectable service
  • Updated command handlers to use new IStackActions dependency
  • Refactored tests to use mocks instead of real Git repositories

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
SyncStackCommand.cs Updated to call stackActions.PushChanges() instead of static helper
PushStackCommand.cs Added IStackActions dependency and updated constructor/method calls
StackHelpers.cs Removed static PushChanges method
StackActions.cs Added PushChanges method to interface and implementation
PushStackCommandHandlerTests.cs Refactored tests to use mocks instead of real Git repositories
StackHelpersTests.cs Removed test for moved PushChanges method
StackActionsTests.cs Added comprehensive tests for new PushChanges functionality

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Changes only affect the internal API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants