feat(cli): add interactive mode support for user input during builds#142
Merged
DecSmith42 merged 6 commits intomainfrom Jan 4, 2025
Merged
feat(cli): add interactive mode support for user input during builds#142DecSmith42 merged 6 commits intomainfrom
DecSmith42 merged 6 commits intomainfrom
Conversation
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`.
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduced
InteractiveArgfor enabling interactive mode in the CLI. AddedHasInteractiveproperty inCommandLineArgsto detect the-i/--interactiveargument. ExtendedParamServiceto prompt users for parameter inputs when in interactive mode. AdjustedBuildExecutorto handle execution flow for interactive and non-interactive modes. Unit tests updated to include support forIAnsiConsole.