Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a --var command-line option to the create-spec command, allowing users to provide template variable values directly via the command line instead of interactive prompts.
- Added
--varargument parsing to accept key=value pairs for template variables - Modified
handle_create_specfunction to process and use provided variable overrides - Added comprehensive test coverage for various
--varusage scenarios
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| cxk.py | Added --var argument to create-spec subparser and updated function call |
| commands/create_spec.py | Implemented variable override logic to parse and use --var values |
| tests/e2e/test_e2e.py | Added extensive test coverage for --var functionality and removed outdated assertions |
| tests/README.md | Added manual testing examples demonstrating --var usage |
| print(f" {var}: {raw_value}") | ||
| else: | ||
| raw_value = await collect_var_value(var) | ||
| print(f" {var}: {raw_value}") |
There was a problem hiding this comment.
The variable assignment is missing after displaying the provided variable value. The raw_value is displayed but never assigned to collected_vars[var], causing the variable to be undefined during template rendering.
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.
No description provided.