File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import * as Resources from '@gitbeaker/core';
10
10
import { Gitlab } from '@gitbeaker/rest' ;
11
11
12
12
import { configs } from '../../Config' ;
13
+ import { Log } from '../../Logger' ;
13
14
14
15
export class GitLabMRService implements IGitLabMRService {
15
16
private readonly projectId : number ;
@@ -86,7 +87,12 @@ export class GitLabMRService implements IGitLabMRService {
86
87
) ;
87
88
const collected = versions . filter ( ( v ) => v . state === 'collected' ) ;
88
89
89
- if ( collected . length === 0 ) throw new Error ( 'No collected version in MR' ) ;
90
+ if ( collected . length === 0 ) {
91
+ Log . warn (
92
+ 'No collected version in this MR, will use SHA from the latest commit instead.' ,
93
+ ) ;
94
+ return versions [ 0 ] ;
95
+ }
90
96
91
97
return collected [ 0 ] ;
92
98
}
You can’t perform that action at this time.
0 commit comments