From ac68d9bd03429ca82f6bbea881350348e6bb71b6 Mon Sep 17 00:00:00 2001 From: Miguel Martinez Date: Sun, 15 Dec 2024 14:38:20 +0100 Subject: [PATCH 1/2] fix(cli): attached add fix Signed-off-by: Miguel Martinez --- app/cli/cmd/attached_integration_add.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/cli/cmd/attached_integration_add.go b/app/cli/cmd/attached_integration_add.go index 79598857a..516950dd2 100644 --- a/app/cli/cmd/attached_integration_add.go +++ b/app/cli/cmd/attached_integration_add.go @@ -28,8 +28,8 @@ func newAttachedIntegrationAttachCmd() *cobra.Command { Use: "add", Aliases: []string{"attach"}, Short: "Attach an existing registered integration to a workflow", - Example: ` chainloop integration attached add --workflow deadbeef --integration beefdoingwell --opt projectName=MyProject --opt projectVersion=1.0.0`, - RunE: func(cmd *cobra.Command, args []string) error { + Example: ` chainloop integration attached add --workflow deadbeef --project my-project --integration beefdoingwell --opt projectName=MyProject --opt projectVersion=1.0.0`, + RunE: func(_ *cobra.Command, args []string) error { // Find the integration to extract the kind of integration we care about integration, err := action.NewRegisteredIntegrationDescribe(actionOpts).Run(integrationName) if err != nil { @@ -67,7 +67,7 @@ func newAttachedIntegrationAttachCmd() *cobra.Command { cmd.Flags().StringVar(&workflowName, "workflow", "", "name of the workflow to attach this integration") cobra.CheckErr(cmd.MarkFlagRequired("workflow")) - cmd.Flags().StringVar(&workflowName, "project", "", "name of the project the workflow belongs to") + cmd.Flags().StringVar(&projectName, "project", "", "name of the project the workflow belongs to") cobra.CheckErr(cmd.MarkFlagRequired("project")) // StringSlice seems to struggle with comma-separated values such as p12 jsonKeys provided as passwords From 90bd3c71a7b2adb767050caa338c277499f4382a Mon Sep 17 00:00:00 2001 From: Miguel Martinez Date: Sun, 15 Dec 2024 15:02:00 +0100 Subject: [PATCH 2/2] fix linter Signed-off-by: Miguel Martinez --- app/cli/cmd/attached_integration_add.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/cli/cmd/attached_integration_add.go b/app/cli/cmd/attached_integration_add.go index 516950dd2..153b25a44 100644 --- a/app/cli/cmd/attached_integration_add.go +++ b/app/cli/cmd/attached_integration_add.go @@ -29,7 +29,7 @@ func newAttachedIntegrationAttachCmd() *cobra.Command { Aliases: []string{"attach"}, Short: "Attach an existing registered integration to a workflow", Example: ` chainloop integration attached add --workflow deadbeef --project my-project --integration beefdoingwell --opt projectName=MyProject --opt projectVersion=1.0.0`, - RunE: func(_ *cobra.Command, args []string) error { + RunE: func(_ *cobra.Command, _ []string) error { // Find the integration to extract the kind of integration we care about integration, err := action.NewRegisteredIntegrationDescribe(actionOpts).Run(integrationName) if err != nil {