File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -404,16 +404,15 @@ exports.checkAndTruncateVCSInfo = (gitMetaData) => {
404
404
const truncateSize = gitMetaDataSizeInKb - MAX_GIT_META_DATA_SIZE_IN_KB ;
405
405
const truncatedCommitMessage = this . truncateString ( gitMetaData . commit_message , truncateSize ) ;
406
406
gitMetaData . commit_message = truncatedCommitMessage ;
407
- exports . debug ( 'The commit has been truncated' ) ;
408
- logger . debug ( 'The commit has been truncated' ) ;
407
+ logger . info ( `The commit has been truncated. Size of commit after truncation is ${ this . getSizeOfJsonObjectInKb ( gitMetaData ) } ` ) ;
409
408
}
410
409
411
410
return gitMetaData ;
412
411
} ;
413
412
414
413
exports . getSizeOfJsonObjectInKb = ( jsonData ) => {
415
414
try {
416
- if ( jsonData ) {
415
+ if ( jsonData && jsonData instanceof Object ) {
417
416
const buffer = Buffer . from ( JSON . stringify ( jsonData ) ) ;
418
417
419
418
return Math . floor ( buffer . length / 1024 ) ;
You can’t perform that action at this time.
0 commit comments