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';
1010import { Gitlab } from '@gitbeaker/rest' ;
1111
1212import { configs } from '../../Config' ;
13+ import { Log } from '../../Logger' ;
1314
1415export class GitLabMRService implements IGitLabMRService {
1516 private readonly projectId : number ;
@@ -86,7 +87,12 @@ export class GitLabMRService implements IGitLabMRService {
8687 ) ;
8788 const collected = versions . filter ( ( v ) => v . state === 'collected' ) ;
8889
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+ }
9096
9197 return collected [ 0 ] ;
9298 }
You can’t perform that action at this time.
0 commit comments