From 54beb3151194cda46bd221aa35118eb6f45c9cb1 Mon Sep 17 00:00:00 2001 From: ajaykumargdr Date: Wed, 27 Dec 2023 16:18:48 +0530 Subject: [PATCH] chore: Add code to create hello-world workflow instead empty workflow on "composer new" command --- workflow/composer-v2/src/commands/create.rs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/workflow/composer-v2/src/commands/create.rs b/workflow/composer-v2/src/commands/create.rs index ce188d79..55ea86ed 100644 --- a/workflow/composer-v2/src/commands/create.rs +++ b/workflow/composer-v2/src/commands/create.rs @@ -18,10 +18,22 @@ impl Create { let temp_path = package.join("main.echo"); let content = format!( - "workflows( + "hello_world = task( + kind = \"hello_world\", + action_name = \"hello_world\", + input_arguments = [ + argument( + name=\"name\", + input_type = String, + default_value = \"World\" + ), + ], + ) + + workflows( name = {}, version = \"0.0.1\", - tasks = [] + tasks = [hello_world] )", self.package_name );