File tree Expand file tree Collapse file tree 2 files changed +15
-11
lines changed
lib/interface/cli/commands/workflow Expand file tree Collapse file tree 2 files changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,15 @@ const command = new Command({
9494 } = argv ;
9595 const pipelineNames = ! _ . isArray ( argv [ 'pipeline-name' ] ) ? [ ( argv [ 'pipeline-name' ] ) ] : argv [ 'pipeline-name' ] ;
9696 const pipelineIds = ! _ . isArray ( argv [ 'pipeline-id' ] ) ? [ ( argv [ 'pipeline-id' ] ) ] : argv [ 'pipeline-id' ] ;
97+ const requestOptions = {
98+ limit,
99+ page,
100+ status,
101+ trigger,
102+ branchName,
103+ revision,
104+ pipelineTriggerId,
105+ } ;
97106
98107 let workflows = [ ] ;
99108 // TODO:need to decide for one way for error handeling
@@ -109,20 +118,15 @@ const command = new Command({
109118 _ . forEach ( pipelines . docs , ( currPipeline ) => {
110119 pipelineIds . push ( currPipeline . metadata . id ) ;
111120 } ) ;
121+ requestOptions . pipeline = pipelineIds ;
112122 } else if ( _ . isEmpty ( pipelineIds ) ) {
113123 throw new CFError ( 'Cannot find any builds with these pipelines names' ) ;
114124 }
125+ } else if ( ! _ . isEmpty ( pipelineIds ) ) {
126+ requestOptions . pipeline = pipelineIds ;
115127 }
116- const result = await sdk . workflows . list ( {
117- limit,
118- page,
119- status,
120- trigger,
121- branchName,
122- revision,
123- pipelineTriggerId,
124- pipeline : _ . isEmpty ( pipelineIds ) ? undefined : pipelineIds ,
125- } ) ;
128+
129+ const result = await sdk . workflows . list ( requestOptions ) ;
126130 Output . print ( _ . map ( _ . get ( result , 'workflows.docs' ) , Workflow . fromResponse ) ) ;
127131 }
128132 } ,
Original file line number Diff line number Diff line change 11{
22 "name" : " codefresh" ,
3- "version" : " 0.42.0 " ,
3+ "version" : " 0.42.1 " ,
44 "description" : " Codefresh command line utility" ,
55 "main" : " index.js" ,
66 "preferGlobal" : true ,
You can’t perform that action at this time.
0 commit comments