@@ -26,7 +26,6 @@ declare var CodeMirror: any;
26
26
changeDetection : ChangeDetectionStrategy . OnPush
27
27
} )
28
28
@AutoUnsubscribe ( )
29
-
30
29
export class WorkflowNodeRunParamComponent implements AfterViewInit {
31
30
@ViewChild ( 'runWithParamModal' )
32
31
runWithParamModal : ModalTemplate < boolean , boolean , void > ;
@@ -104,7 +103,7 @@ export class WorkflowNodeRunParamComponent implements AfterViewInit {
104
103
this . currentNodeRun = this . _store . selectSnapshot ( WorkflowState . nodeRunSnapshot ) ;
105
104
this . currentWorkflowRun = this . _store . selectSnapshot ( WorkflowState . workflowRunSnapshot ) ;
106
105
this . workflow = this . _store . selectSnapshot ( WorkflowState . workflowSnapshot ) ;
107
- this . projectKey = this . _store . selectSnapshot ( ProjectState . projectSnapshot ) . key ;
106
+ this . projectKey = this . _store . selectSnapshot ( ProjectState . projectSnapshot ) . key ;
108
107
109
108
if ( this . currentNodeRun && this . currentNodeRun . workflow_node_id !== this . nodeToRun . id ) {
110
109
delete this . currentNodeRun ;
@@ -124,7 +123,11 @@ export class WorkflowNodeRunParamComponent implements AfterViewInit {
124
123
}
125
124
}
126
125
127
- this . linkedToRepo = WNode . linkedToRepo ( this . nodeToRun , this . workflow ) ;
126
+ if ( this . currentWorkflowRun && this . currentWorkflowRun . workflow ) {
127
+ this . linkedToRepo = WNode . linkedToRepo ( this . nodeToRun , this . currentWorkflowRun . workflow ) ;
128
+ } else {
129
+ this . linkedToRepo = WNode . linkedToRepo ( this . nodeToRun , this . workflow ) ;
130
+ }
128
131
129
132
let num : number ;
130
133
let nodeRunID : number ;
@@ -221,7 +224,7 @@ export class WorkflowNodeRunParamComponent implements AfterViewInit {
221
224
. pipe ( first ( ) , finalize ( ( ) => this . _cd . markForCheck ( ) ) )
222
225
. subscribe ( n => {
223
226
this . lastNum = n . num + 1 ;
224
- this . getCommits ( n . num + 1 , false ) ;
227
+ this . getCommits ( n . num + 1 , false ) ;
225
228
} ) ;
226
229
} else {
227
230
this . getCommits ( this . num , false ) ;
@@ -433,7 +436,7 @@ export class WorkflowNodeRunParamComponent implements AfterViewInit {
433
436
this . refreshVCSInfos ( this . payloadRemote ) ;
434
437
}
435
438
436
- this . getCommits ( num || this . lastNum , true ) ;
439
+ this . getCommits ( num || this . lastNum , true ) ;
437
440
} ) ;
438
441
}
439
442
}
0 commit comments