From eeb68764f2b405bbcd03086584a22b3e4703cf84 Mon Sep 17 00:00:00 2001 From: Ardalan Amini Date: Sun, 18 Oct 2020 01:35:33 +0330 Subject: [PATCH] breaking: Omit flag from the log title --- src/changelog.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/changelog.ts b/src/changelog.ts index 4f2e45a..d5fb934 100644 --- a/src/changelog.ts +++ b/src/changelog.ts @@ -44,9 +44,7 @@ export async function generate( PR_REGEX, (match, pull) => `[${match}](${repoUrl}/pull/${pull})`, ); - if (flag) title = title.replace(new RegExp(` ?\\[${flag}\\]$`), ""); title = `${title} ([${sha.slice(0, 8)}](${repoUrl}/commit/${sha}))`; - if (flag) title += ` **[${flag}]**`; commits[type] = commits[type] ?? {}; commits[type][category] = commits[type][category] ?? []; @@ -92,7 +90,7 @@ function trim(value: string): string { return value.trim().replace(/ {2,}/g, " "); } -const COMMIT_REGEX = /^([^)]*)(?:\(([^)]*?)\)|):(.*?(?:\[([^\]]+?)\]|))\s*$/; +const COMMIT_REGEX = /^([^)]*)(?:\(([^)]*?)\)|):(.*?)(?:\[([^\]]+?)\]|)\s*$/; const PR_REGEX = /#([1-9]\d*)/g; const TYPES = {