@@ -52,8 +52,7 @@ export interface Actions {
5252 projectColumn ?: ColumnName | "REMOVE" ;
5353 labels : LabelName [ ] ;
5454 responseComments : Comments . Comment [ ] ;
55- shouldClose : boolean ;
56- shouldMerge : boolean ;
55+ state ?: "close" | "merge" ;
5756 shouldUpdateLabels : boolean ;
5857}
5958
@@ -62,8 +61,6 @@ function createDefaultActions(): Actions {
6261 projectColumn : "Other" ,
6362 labels : [ ] ,
6463 responseComments : [ ] ,
65- shouldClose : false ,
66- shouldMerge : false ,
6764 shouldUpdateLabels : true ,
6865 } ;
6966}
@@ -72,8 +69,6 @@ function createEmptyActions(): Actions {
7269 return {
7370 labels : [ ] ,
7471 responseComments : [ ] ,
75- shouldClose : false ,
76- shouldMerge : false ,
7772 shouldUpdateLabels : false ,
7873 } ;
7974}
@@ -320,7 +315,7 @@ export function process(prInfo: BotResult,
320315 ( info . tooManyOwners || info . hasMultiplePackages ) ? [ ] : info . otherOwners ,
321316 headCommitAbbrOid ) ) ;
322317 if ( info . hasValidMergeRequest ) {
323- actions . shouldMerge = true ;
318+ actions . state = "merge" ;
324319 actions . projectColumn = "Recently Merged" ;
325320 } else {
326321 actions . projectColumn = "Waiting for Author to Merge" ;
@@ -334,7 +329,7 @@ export function process(prInfo: BotResult,
334329 }
335330 }
336331
337- if ( ! actions . shouldMerge ) {
332+ if ( ! actions . state ) {
338333 if ( info . mergeRequestUser ) {
339334 post ( Comments . WaitUntilMergeIsOK ( info . mergeRequestUser , headCommitAbbrOid , urls . workflow ) ) ;
340335 }
@@ -372,7 +367,7 @@ function makeStaleness(now: Date, author: string, otherOwners: string[]) { // cu
372367 }
373368 if ( state === "done" ) {
374369 if ( doneColumn === "CLOSE" ) {
375- actions . shouldClose = true ;
370+ actions . state = "close" ;
376371 actions . projectColumn = "REMOVE" ;
377372 } else {
378373 actions . projectColumn = doneColumn ;
0 commit comments