Skip to content

feat(cli): add interactive mode support for user input during builds#142

Merged
DecSmith42 merged 6 commits intomainfrom
dev
Jan 4, 2025
Merged

feat(cli): add interactive mode support for user input during builds#142
DecSmith42 merged 6 commits intomainfrom
dev

Conversation

@DecSmith42
Copy link
Owner

Introduced InteractiveArg for enabling interactive mode in the CLI. Added HasInteractive property in CommandLineArgs to detect the -i/--interactive argument. Extended ParamService to prompt users for parameter inputs when in interactive mode. Adjusted BuildExecutor to handle execution flow for interactive and non-interactive modes. Unit tests updated to include support for IAnsiConsole.

Introduced `InteractiveArg` for enabling interactive mode in the CLI.
Added `HasInteractive` property in `CommandLineArgs` to detect the `-i/--interactive` argument.
Extended `ParamService` to prompt users for parameter inputs when in interactive mode.
Adjusted `BuildExecutor` to handle execution flow for interactive and non-interactive modes.
Unit tests updated to include support for `IAnsiConsole`.
Copilot AI review requested due to automatic review settings January 4, 2025 13:48
@DecSmith42 DecSmith42 enabled auto-merge January 4, 2025 13: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.

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

Files not reviewed (1)
  • DecSm.Atom.Tests/ClassTests/Params/ParamServiceTests.cs: Evaluated as low risk
Comments suppressed due to low confidence (2)

DecSm.Atom/Params/ParamService.cs:197

  • The 'Mask' property should only be set when 'IsSecret' is true. Update the code to conditionally set the 'Mask' property based on the 'IsSecret' value.
Mask = '*',

DecSm.Atom/Build/BuildExecutor.cs:93

  • [nitpick] The error message could be more descriptive by including the specific parameter name and target definition name.
logger.LogError("Missing required parameter '{ParamName}' for target {TargetDefinitionName}", requiredParam.ArgName, target.Name);

Updated multiple projects to use newer versions of the following packages:
- Roslynator (4.12.9 -> 4.12.10)
- NUnit (4.2.2 -> 4.3.2)
- Microsoft.CodeAnalysis.CSharp.Workspaces (4.11.0 -> 4.12.0)
- TestableIO.System.IO.Abstractions.TestingHelpers (21.1.7 -> 21.2.1)
- Verify.NUnit (28.4.0 -> 28.7.0)
- NUnit.Analyzers (4.4.0 -> 4.5.0)
- Coverlet.Collector (6.0.2 -> 6.0.3)
Refactored log message splitting to use a pre-defined array for delimiters. Resolves ambiguous call error.
Updated commands in multiple locations to use 'dotnet tool update'
instead of 'dotnet tool install' for already installed tools. This
ensures correct behavior and avoids potential errors when re-installing
existing tools.

Affected files:
- DotnetToolService.cs
- DevopsWorkflowWriter.cs
- GithubWorkflowWriter.cs
Previously, the raw result was being cached instead of the converted value. This could lead to unexpected behavior when retrieved from the cache. The fix ensures the converted result is both cached and returned.
@DecSmith42 DecSmith42 merged commit 6d55a0e into main Jan 4, 2025
81 of 85 checks passed
@DecSmith42 DecSmith42 deleted the dev branch January 4, 2025 14:44
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