Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: refactor command structure #587

Merged
merged 21 commits into from
Apr 8, 2025
Merged

chore: refactor command structure #587

merged 21 commits into from
Apr 8, 2025

Conversation

wagoodman
Copy link
Owner

@wagoodman wagoodman commented Mar 29, 2025

This PR aims to make no functional changes. Instead this is a quality-of-life change to make it easier to work with the CLI options and decoupling a lot of the just-in-time config parsing mixed in with the business logic (in CI rule and ui packages). Now all of the config/viper configuration parsing lives purely under the cmd package. This also brings in CLI-level testing so we can ensure that flag and config options are parsed by cobra/viper in a way that we expect and is testable. Additionally any UI interaction is strongly separated from the business logic by using a bus to emit events which the UI responds to and having an adapter layer to emit these events for the majority of interactions, decorating business-level objects to observe any interactions.

Ultimately, when merged, this should set a better foundation for the application as a whole (to build upon when adding features in the future).

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
@wagoodman wagoodman force-pushed the update-app-patterns branch from 6c7e00f to 0018605 Compare April 1, 2025 14:04
@wagoodman wagoodman marked this pull request as ready for review April 8, 2025 16:16
@wagoodman wagoodman merged commit 788fcd3 into main Apr 8, 2025
6 checks passed
@wagoodman wagoodman deleted the update-app-patterns branch April 8, 2025 16:19
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.

1 participant