Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: improve changelog isVersionBump & commitID replacement regex #1006

Merged
merged 3 commits into from Sep 13, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/changelog.js
Expand Up @@ -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}"..`)
Expand All @@ -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.
Expand Down