@@ -20,14 +20,15 @@ import (
2020 "github.com/spf13/cobra"
2121)
2222
23- func newWorkflowIntegrationAttachCmd () * cobra.Command {
23+ func newAttachedIntegrationAttachCmd () * cobra.Command {
2424 var options []string
2525 var integrationID , workflowID string
2626
2727 cmd := & cobra.Command {
28- Use : "attach" ,
28+ Use : "add" ,
29+ Aliases : []string {"attach" },
2930 Short : "Attach an existing registered integration to a workflow" ,
30- Example : ` chainloop workflow integration attach --workflow deadbeef --integration beefdoingwell --options projectName=MyProject` ,
31+ Example : ` chainloop integration attached add --workflow deadbeef --integration beefdoingwell --options projectName=MyProject` ,
3132 RunE : func (cmd * cobra.Command , args []string ) error {
3233 // Find the integration to extract the kind of integration we care about
3334 integration , err := action .NewRegisteredIntegrationDescribe (actionOpts ).Run (integrationID )
@@ -51,12 +52,12 @@ func newWorkflowIntegrationAttachCmd() *cobra.Command {
5152 return err
5253 }
5354
54- res , err := action .NewWorkflowIntegrationAttach (actionOpts ).Run (integrationID , workflowID , opts )
55+ res , err := action .NewAttachedIntegrationAdd (actionOpts ).Run (integrationID , workflowID , opts )
5556 if err != nil {
5657 return err
5758 }
5859
59- return encodeOutput ([]* action.IntegrationAttachmentItem {res }, integrationAttachmentListTableOutput )
60+ return encodeOutput ([]* action.AttachedIntegrationItem {res }, attachedIntegrationListTableOutput )
6061 },
6162 }
6263
@@ -67,7 +68,6 @@ func newWorkflowIntegrationAttachCmd() *cobra.Command {
6768 cobra .CheckErr (cmd .MarkFlagRequired ("workflow" ))
6869
6970 cmd .Flags ().StringSliceVar (& options , "options" , nil , "integration attachment arguments" )
70- cmd .AddCommand (newWorkflowIntegrationAttachDependencyTrackCmd ())
7171
7272 return cmd
7373}
0 commit comments