diff --git a/scripts/releaseChangelog.js b/scripts/releaseChangelog.js index 9c4a6ef3ab399c..57cf9fd0c99070 100644 --- a/scripts/releaseChangelog.js +++ b/scripts/releaseChangelog.js @@ -126,7 +126,7 @@ async function main(argv) { .toString() // Padding them with a zero means we can just feed a list into online sorting tools like https://www.online-utility.org/text/sort.jsp // i.e. we can sort the lines alphanumerically - .padStart(Math.ceil(Math.log10(commitsItemsByDateDesc.length)), '0')} -->`; + .padStart(Math.floor(Math.log10(commitsItemsByDateDesc.length)) + 1, '0')} -->`; const shortMessage = commitsItem.commit.message.split('\n')[0]; return `- ${dateSortMarker}${shortMessage} @${commitsItem.author.login}`; });