Skip to content

Add --var option#4

Merged
eyalzh merged 1 commit intomainfrom
add-var-cli-option
Aug 10, 2025
Merged

Add --var option#4
eyalzh merged 1 commit intomainfrom
add-var-cli-option

Conversation

@eyalzh
Copy link
Owner

@eyalzh eyalzh commented Aug 10, 2025

No description provided.

@eyalzh eyalzh requested a review from Copilot August 10, 2025 09:57
Copy link

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 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 --var argument parsing to accept key=value pairs for template variables
  • Modified handle_create_spec function to process and use provided variable overrides
  • Added comprehensive test coverage for various --var usage 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}")
Copy link

Copilot AI Aug 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@eyalzh eyalzh merged commit d1c2ef9 into main Aug 10, 2025
1 check passed
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