ci: fixed bump-version script

This commit is contained in:
Tim-Niclas Oelschläger 2024-04-08 03:58:04 +02:00
parent 0e6f0bc14c
commit 2c05c7676a
Signed by: zokki
SSH Key Fingerprint: SHA256:HxmVKMFSukiF1LvbgazUKRFiTky2CzbvN72B8U1yhXo
2 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@ const flatPrefixes = Object.values(prefixes).flat();
/** @type {Record<string, { title: string; content: (string | { title: string; messages: string[] })[] }>} */
const prefixToMdMap = {
feat: { title: 'Features', content: [] },
feat: { title: 'Enhancements', content: [] },
enhance: { title: 'Enhancements', content: [] },
fix: { title: 'Fixes', content: [] },
style: { title: 'Styles', content: [] },
docs: { title: 'Documentations', content: [] },
@ -67,7 +67,7 @@ exec(gitLogCommand, async (err, stdout) => {
(prId ? `[#${prId}](${repoUrl}/pull/${prId})` : '') +
`[\`${hash.substring(0, 10)}\`](${repoUrl}/commit/${hash}) - ${message.replace(prefixReplaceRegex, '')}`;
const content = prefixToMdMap[messagePrefixMatch[2]].content;
const content = prefixToMdMap[messagePrefixMatch[2]]?.content || [];
if (messagePrefixMatch[4]) {
const idk = content.find(c => typeof c === 'object' && c.title === messagePrefixMatch[4]);
if (!idk) {

View File

@ -1,5 +1,5 @@
/** Add leading-zero */
const padNums = num => String(num).padStart(2, '0');
export const padNums = num => String(num).padStart(2, '0');
/** Get a time-string which is formatted like HH:mm:ss */
const getTime = () => {
const currDate = new Date();