From e4fe528e9ca8679ee5ea7ae02f4aa2b49475c9d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Mart=C3=ADnez?= Date: Mon, 13 Sep 2021 09:49:29 +0200 Subject: [PATCH] chore: improve changelog isVersionBump & commitID replacement regex (#1006) * chore: improve changelog isVersionBump & commitID replacement regex * chore: fix changelog space replacement Co-authored-by: Chris Swithinbank --- scripts/changelog.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/changelog.js b/scripts/changelog.js index 071095cd4..0a9f769bc 100644 --- a/scripts/changelog.js +++ b/scripts/changelog.js @@ -30,7 +30,7 @@ const isFeature = (s) => /feat(\(\w+\))?:/.test(s); const isUninformative = (s) => /(test|style|chore|docs|ci)(\([\w-]+\))?:/.test(s); /** Tests if this commit just bumped the version (via `npm version`). */ -const isVersionBump = (s) => /^\w{8} \d+\.\d+\.\d+$/.test(s); +const isVersionBump = (s) => /^\w+\s\d+\.\d+\.\d+$/.test(s); const changes = shell .exec(`git log --oneline "${PREVIOUS_TAG}"..`) @@ -51,7 +51,7 @@ const formatChanges = (changes) => .replace(/[a-z]+\((\w+)\)/, '$1') // Linkify commit refs. .replace( - /^(\w{8})/, + /^(\w+)/, '* [[$1](https://github.com/boardgameio/boardgame.io/commit/$1)]' ) // Linkify PR references.