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

[SM-1287] Refactor out command logic from main.rs in bws #809

Merged
merged 18 commits into from
Jun 21, 2024
Merged

Conversation

coltonhurst
Copy link
Member

@coltonhurst coltonhurst commented May 28, 2024

🎟️ Tracking

SM-1287

📔 Objective

The goal of this PR is to refactor bws/src/main.rs and the process_commands() function. This PR moves the actual CLI interaction for individual commands to the command module and appropriate sub-modules.

There are plenty of other additions and changes to be made, but I'm trying to keep this PR a clean refactor and we can address other items in separate PR's.

Deprecation of the legacy CLI commands will happen in SM-1175.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation
    team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed
    issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@coltonhurst coltonhurst changed the title [SM-1287] Refactor out completions and config command from main.rs in bws [SM-1287] Refactor out command logic from main.rs in bws May 28, 2024
Copy link
Contributor

github-actions bot commented May 28, 2024

Logo
Checkmarx One – Scan Summary & Details0ece974d-f9a9-47cb-8564-8840fa17ed91

No New Or Fixed Issues Found

Copy link

codecov bot commented May 28, 2024

Codecov Report

Attention: Patch coverage is 0% with 298 lines in your changes missing coverage. Please review.

Project coverage is 59.68%. Comparing base (331c321) to head (146db57).

Files Patch % Lines
crates/bws/src/command/secret.rs 0.00% 115 Missing ⚠️
crates/bws/src/command/project.rs 0.00% 92 Missing ⚠️
crates/bws/src/main.rs 0.00% 40 Missing ⚠️
crates/bws/src/command/mod.rs 0.00% 37 Missing ⚠️
crates/bws/src/render.rs 0.00% 12 Missing ⚠️
crates/bws/src/config.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #809      +/-   ##
==========================================
- Coverage   60.30%   59.68%   -0.62%     
==========================================
  Files         189      192       +3     
  Lines       12361    12489     +128     
==========================================
  Hits         7454     7454              
- Misses       4907     5035     +128     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

crates/bws/src/command/project.rs Fixed Show fixed Hide fixed
crates/bws/src/command/project.rs Fixed Show fixed Hide fixed
crates/bws/src/command/secret.rs Fixed Show fixed Hide fixed
crates/bws/src/command/secret.rs Fixed Show fixed Hide fixed
crates/bws/src/command/secret.rs Fixed Show fixed Hide fixed
crates/bws/src/command/secret.rs Fixed Show fixed Hide fixed
crates/bws/src/main.rs Fixed Show fixed Hide fixed
crates/bws/src/main.rs Fixed Show fixed Hide fixed
crates/bws/src/main.rs Fixed Show fixed Hide fixed
crates/bws/src/main.rs Fixed Show fixed Hide fixed
crates/bws/src/main.rs Fixed Show fixed Hide fixed
crates/bws/src/main.rs Fixed Show fixed Hide fixed
Copy link
Member

@Hinton Hinton left a comment

Choose a reason for hiding this comment

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

I think this is a good direction.

crates/bws/src/main.rs Show resolved Hide resolved
crates/bws/src/command/mod.rs Fixed Show fixed Hide fixed
crates/bws/src/command/mod.rs Fixed Show fixed Hide fixed
@coltonhurst coltonhurst marked this pull request as ready for review June 3, 2024 19:01
@coltonhurst coltonhurst self-assigned this Jun 3, 2024
@coltonhurst coltonhurst requested review from Hinton, dani-garcia and a team June 3, 2024 19:01
Thomas-Avery
Thomas-Avery previously approved these changes Jun 3, 2024
Copy link
Contributor

@Thomas-Avery Thomas-Avery left a comment

Choose a reason for hiding this comment

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

Nice refactor looks good!

crates/bws/src/command/mod.rs Outdated Show resolved Hide resolved
crates/bws/src/main.rs Outdated Show resolved Hide resolved
crates/bws/src/command/project.rs Outdated Show resolved Hide resolved
crates/bws/src/command/project.rs Outdated Show resolved Hide resolved
crates/bws/src/command/secret.rs Show resolved Hide resolved
crates/bws/src/command/secret.rs Outdated Show resolved Hide resolved
crates/bws/src/command/project.rs Fixed Show fixed Hide fixed
crates/bws/src/command/project.rs Fixed Show fixed Hide fixed
crates/bws/src/command/project.rs Fixed Show fixed Hide fixed
crates/bws/src/command/project.rs Fixed Show fixed Hide fixed
crates/bws/src/command/project.rs Fixed Show fixed Hide fixed
crates/bws/src/command/secret.rs Fixed Show fixed Hide fixed
crates/bws/src/command/secret.rs Fixed Show fixed Hide fixed
crates/bws/src/command/secret.rs Fixed Show fixed Hide fixed
crates/bws/src/command/secret.rs Fixed Show fixed Hide fixed
crates/bws/src/command/secret.rs Fixed Show fixed Hide fixed
@coltonhurst coltonhurst merged commit 4b1d6a1 into main Jun 21, 2024
105 checks passed
@coltonhurst coltonhurst deleted the sm/sm-1287 branch June 21, 2024 17:30
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.

None yet

4 participants