Skip to content

Conversation

@ajaskolski
Copy link
Contributor

@ajaskolski ajaskolski commented Jan 26, 2026

@changeset-bot
Copy link

changeset-bot bot commented Jan 26, 2026

⚠️ No Changeset found

Latest commit: 89a2f52

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ajaskolski ajaskolski force-pushed the introduce-new-modular-cmds-state branch 2 times, most recently from 27212fb to 08ec92d Compare January 26, 2026 16:56
@ajaskolski ajaskolski marked this pull request as ready for review January 26, 2026 17:03
@ajaskolski ajaskolski requested a review from a team as a code owner January 26, 2026 17:03
Copilot AI review requested due to automatic review settings January 26, 2026 17:03
Copy link
Contributor

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 state command implementation into a modular, testable package structure. The refactoring moves state command logic from the legacy CLI commands to a new pkg/commands/state package with improved dependency injection and test coverage.

Changes:

  • Introduces a new modular state command package with dependency injection support
  • Adds comprehensive test coverage for the state generation functionality
  • Provides a factory pattern for creating commands with shared configuration
  • Updates legacy CLI to delegate to the new modular implementation for backward compatibility

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/commands/state/generate.go New file implementing the state generation command with injectable dependencies
pkg/commands/state/deps.go New file defining dependency injection types and configuration for state commands
pkg/commands/state/command_test.go New comprehensive test suite covering state command functionality
pkg/commands/state/command.go New file providing the main command constructor with subcommand registration
pkg/commands/commands_test.go New tests for the Commands factory pattern
pkg/commands/commands.go New factory for creating CLI commands with shared configuration
engine/cld/legacy/cli/commands/state_test.go Updated legacy tests to use the new Commands constructor
engine/cld/legacy/cli/commands/state.go Refactored to delegate to the new modular state package

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ajaskolski ajaskolski force-pushed the introduce-new-modular-cmds-state branch from 08ec92d to 0e44940 Compare January 26, 2026 17:05
Copilot AI review requested due to automatic review settings January 27, 2026 08:48
Copy link
Contributor

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

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ajaskolski ajaskolski force-pushed the introduce-new-modular-cmds-state branch from b893610 to 89a2f52 Compare January 27, 2026 08:51
@cl-sonarqube-production
Copy link

@ajaskolski
Copy link
Contributor Author

Thank you for all the comments @graham-chainlink, updated accordingly, answered.

Copy link
Collaborator

@graham-chainlink graham-chainlink left a comment

Choose a reason for hiding this comment

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

Nice one, looks good to me!

@ajaskolski ajaskolski added this pull request to the merge queue Jan 27, 2026
Merged via the queue into main with commit 84843aa Jan 27, 2026
21 of 22 checks passed
@ajaskolski ajaskolski deleted the introduce-new-modular-cmds-state branch January 27, 2026 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants