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) => {
404404 const truncateSize = gitMetaDataSizeInKb - MAX_GIT_META_DATA_SIZE_IN_KB ;
405405 const truncatedCommitMessage = this . truncateString ( gitMetaData . commit_message , truncateSize ) ;
406406 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 ) } ` ) ;
409408 }
410409
411410 return gitMetaData ;
412411} ;
413412
414413exports . getSizeOfJsonObjectInKb = ( jsonData ) => {
415414 try {
416- if ( jsonData ) {
415+ if ( jsonData && jsonData instanceof Object ) {
417416 const buffer = Buffer . from ( JSON . stringify ( jsonData ) ) ;
418417
419418 return Math . floor ( buffer . length / 1024 ) ;
You can’t perform that action at this time.
0 commit comments