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({
94
94
} = argv ;
95
95
const pipelineNames = ! _ . isArray ( argv [ 'pipeline-name' ] ) ? [ ( argv [ 'pipeline-name' ] ) ] : argv [ 'pipeline-name' ] ;
96
96
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
+ } ;
97
106
98
107
let workflows = [ ] ;
99
108
// TODO:need to decide for one way for error handeling
@@ -109,20 +118,15 @@ const command = new Command({
109
118
_ . forEach ( pipelines . docs , ( currPipeline ) => {
110
119
pipelineIds . push ( currPipeline . metadata . id ) ;
111
120
} ) ;
121
+ requestOptions . pipeline = pipelineIds ;
112
122
} else if ( _ . isEmpty ( pipelineIds ) ) {
113
123
throw new CFError ( 'Cannot find any builds with these pipelines names' ) ;
114
124
}
125
+ } else if ( ! _ . isEmpty ( pipelineIds ) ) {
126
+ requestOptions . pipeline = pipelineIds ;
115
127
}
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 ) ;
126
130
Output . print ( _ . map ( _ . get ( result , 'workflows.docs' ) , Workflow . fromResponse ) ) ;
127
131
}
128
132
} ,
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " codefresh" ,
3
- "version" : " 0.42.0 " ,
3
+ "version" : " 0.42.1 " ,
4
4
"description" : " Codefresh command line utility" ,
5
5
"main" : " index.js" ,
6
6
"preferGlobal" : true ,
You can’t perform that action at this time.
0 commit comments