Skip to content

Conversation

DecSmith42
Copy link
Owner

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.

@Copilot Copilot AI review requested due to automatic review settings September 3, 2025 03:48
@DecSmith42 DecSmith42 enabled auto-merge September 3, 2025 03:48
Copy link
Contributor

@Copilot 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.

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 RequiredParams with a unified Params collection that tracks both required and optional parameters
  • Added new UsedParam and DefinedParam records to encapsulate parameter requirements
  • Introduced UsesParam() method for defining optional parameters alongside existing RequiresParam() 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.

@DecSmith42 DecSmith42 force-pushed the feat/optional-params branch 2 times, most recently from f2cddbc to af40b64 Compare September 3, 2025 03:59
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.
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