@@ -12,16 +12,22 @@ export default (ctx: Context): ListrTask<Context, ListrRendererFactory, ListrRen
1212 try {
1313 let resp
1414 if ( ctx . mergeByBranch ) {
15- resp = await ctx . client . mergeBuildsByBuildId ( ctx . mergeBuildSourceId , ctx . mergeBuildTargetId , ctx . mergeByBranch , ctx . mergeByBuild , ctx . mergeBranchSource , ctx . mergeBranchTarget , '' , '' , ctx ) ;
15+ resp = await ctx . client . mergeBuildsByBuildId ( ctx . mergeBuildSourceId , ctx . mergeBuildTargetId , ctx . mergeByBranch , ctx . mergeByBuild , ctx . mergeBranchSource , ctx . mergeBranchTarget , '' , '' , ctx . git , ctx ) ;
1616 } else {
17- resp = await ctx . client . mergeBuildsByBuildId ( ctx . mergeBuildSourceId , ctx . mergeBuildTargetId , ctx . mergeByBranch , ctx . mergeByBuild , '' , '' , ctx . mergeBuildSource , ctx . mergeBuildTarget , ctx ) ;
17+ resp = await ctx . client . mergeBuildsByBuildId ( ctx . mergeBuildSourceId , ctx . mergeBuildTargetId , ctx . mergeByBranch , ctx . mergeByBuild , '' , '' , ctx . mergeBuildSource , ctx . mergeBuildTarget , ctx . git , ctx ) ;
1818 }
19-
20- task . title = 'Merging smartui branch initiated' ;
19+ if ( resp && resp . data && resp . data . message ) {
20+ ctx . log . debug ( `${ resp . data . message } ` )
21+ } else {
22+ ctx . log . error ( `Error while initiating merging process: ${ resp . error . message } ` )
23+ throw new Error ( `Error while initiating merging process: ${ resp . error . message } ` ) ;
24+ }
25+ task . title = 'Merging SmartUI builds initiated' ;
26+ task . output = chalk . gray ( `${ resp . data . message } ` ) ;
2127 } catch ( error : any ) {
2228 ctx . log . debug ( error ) ;
2329 task . output = chalk . gray ( error . message ) ;
24- throw new Error ( 'Merging smartui branch failed' ) ;
30+ throw new Error ( 'Merging SmartUI build failed' ) ;
2531 }
2632 } ,
2733 rendererOptions : { persistentOutput : true }
0 commit comments