-
Couldn't load subscription status.
- Fork 0
feat(params): Add support for optional parameters in targets #215
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
Conversation
There was a problem hiding this 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 introduces support for optional parameters in build targets, allowing targets to define parameters that are not required for execution. The change refactors the parameter model to distinguish between required and optional parameters throughout the system.
- Replaced
RequiredParamswith a unifiedParamscollection that tracks both required and optional parameters - Added new
UsedParamandDefinedParamrecords to encapsulate parameter requirements - Introduced
UsesParam()method for defining optional parameters alongside existingRequiresParam()method
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| DecSm.Atom/Build/Model/UsedParam.cs | New record to wrap parameter models with requirement flag |
| DecSm.Atom/Build/Model/TargetModel.cs | Updated to use unified Params collection instead of RequiredParams |
| DecSm.Atom/Build/Definition/DefinedParam.cs | New record for parameter definitions with requirement flag |
| DecSm.Atom/Build/Definition/TargetDefinition.cs | Added UsesParam method and refactored to use unified parameter collection |
| DecSm.Atom/Build/BuildResolver.cs | Updated parameter resolution to handle required/optional distinction |
| DecSm.Atom/Build/BuildExecutor.cs | Modified validation to only check required parameters |
| DecSm.Atom/Help/HelpService.cs | Updated help generation to handle new parameter structure |
| DecSm.Atom.Tool/Model.cs | Added FileOption for running individual files |
| DecSm.Atom.Tool/Commands/RunHandler.cs | Enhanced to support running individual atom files |
| DecSm.Atom.SourceGenerators/GenerateInterfaceMembersSourceGenerator.cs | Removed unused SimpleName method |
| DecSm.Atom.Module.GithubWorkflows/Generation/GithubWorkflowWriter.cs | Updated to use new parameter structure |
| DecSm.Atom.Module.DevopsWorkflows/Generation/DevopsWorkflowWriter.cs | Updated to use new parameter structure |
| DecSm.Atom.Tests/BuildTests/Params/OptionalParamBuild.cs | New test build demonstrating optional parameter usage |
| DecSm.Atom.Tests/BuildTests/Params/ParamTests.cs | Added test for optional parameter behavior |
| DecSm.Atom.Tests/ClassTests/Build/Model/BuildModelTests.cs | Updated test to use new Params property |
| DecSm.Atom.Tests/ClassTests/Build/Definition/TargetDefinitionTests.cs | Updated test to validate new parameter structure |
| DecSm.Atom.Tests/ClassTests/Build/BuildExecutorTests.cs | Updated test to use new Params property |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
f2cddbc to
af40b64
Compare
Introduced support for defining optional parameters in build targets. Updated `TargetDefinition` and associated models to differentiate between required and optional parameters. Adjusted related functionality in build execution, parameter validation, and workflow generation. Added tests to validate optional parameter behavior.
af40b64 to
975d464
Compare
Introduced support for defining optional parameters in build targets. Updated
TargetDefinitionand associated models to differentiate between required and optional parameters. Adjusted related functionality in build execution, parameter validation, and workflow generation. Added tests to validate optional parameter behavior.