Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 7, 2025

Adds ability to execute Jinja2 and Python transforms directly from the VSCode extension with interactive parameter prompting.

Implementation

  • Command: infrahub.runTransform appears as run button on transform items in YAML tree view
  • Flow: Prompts for branch selection → iterative variable entry in key=value format → spawns terminal executing infrahubctl transform <name> [variables] --branch <branch>
  • Validation: Accepts variables with = in values (e.g., password=abc=def), rejects malformed input, handles cancellation

Changes

  • package.json: Command definition and context menu binding for viewItem =~ /transforms/
  • commands.ts: runTransformCommand() implementation with variable prompting loop
  • infrahubYamlTreeViewProvider.ts: Sets contextValue = 'transforms' on transform items
  • extension.ts: Command registration

Terminal reuses existing runInfrahubctlInTerminal() pattern with environment variable inheritance for authentication.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add run command for transforms</issue_title>
<issue_description>Add run command for transforms that spawns a terminal and prompts for params. For jinja and python

Params can be found here: https://docs.infrahub.app/infrahubctl/infrahubctl-transform</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 7, 2025

Deploying infrahub-vscode with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8fa46c9
Status: ✅  Deploy successful!
Preview URL: https://b008afc2.infrahub-vscode.pages.dev
Branch Preview URL: https://copilot-add-run-command-for.infrahub-vscode.pages.dev

View logs

Copilot AI changed the title [WIP] Add run command for transforms that spawns terminal Add run command for transforms with variable prompting Nov 7, 2025
Copilot AI requested a review from minitriga November 7, 2025 21:20
Copilot finished work on behalf of minitriga November 7, 2025 21:20
@minitriga minitriga marked this pull request as ready for review November 7, 2025 23:27
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.

Add run command for transforms

3 participants