File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -3366,11 +3366,15 @@ function run() {
3366
3366
return __awaiter ( this , void 0 , void 0 , function * ( ) {
3367
3367
try {
3368
3368
const checkerArguments = inputHelper . getInputs ( ) ;
3369
- yield commitMessageChecker . checkCommitMessages ( checkerArguments ) ;
3369
+ if ( checkerArguments . messages . length === 0 ) {
3370
+ core . info ( `No commits found in the payload, skipping check.` ) ;
3371
+ }
3372
+ else {
3373
+ yield commitMessageChecker . checkCommitMessages ( checkerArguments ) ;
3374
+ }
3370
3375
}
3371
3376
catch ( error ) {
3372
- core . error ( error ) ;
3373
- core . setFailed ( error . message ) ;
3377
+ core . setFailed ( error ) ;
3374
3378
}
3375
3379
} ) ;
3376
3380
}
@@ -8776,9 +8780,6 @@ function getMessages() {
8776
8780
}
8777
8781
}
8778
8782
}
8779
- if ( messages . length === 0 ) {
8780
- throw new Error ( `No commits found in the payload.` ) ;
8781
- }
8782
8783
break ;
8783
8784
}
8784
8785
default : {
You can’t perform that action at this time.
0 commit comments