Skip to content
This repository was archived by the owner on May 5, 2024. It is now read-only.

Commit e9673fd

Browse files
committed
fix: Do not drop commits without known type
Projects may have different conventions that those mandated by the conventional-commits-parser[1] package. For example, it is customary to also prefix commits depending on the area of change such as src: fix foobar tests: Fix another test All these commits, when they are parsed, they end up with type == "src" or type == "tests" and the package was dropping them silently because they did not have a known type. However, we shouldn't do that but we should let projects be flexible on how they use their commit messages and simply list them along with those of type == null if they do not have a known type. [1] https://www.npmjs.com/package/conventional-commits-parser
1 parent dcbea0b commit e9673fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/automatic-releases/src/utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export const generateChangelogFromParsedCommits = (parsedCommits: ParsedCommits[
130130

131131
// Commits
132132
const commits = parsedCommits
133-
.filter(val => val.type === null)
133+
.filter(val => val.type === null || Object.keys(ConventionalCommitTypes).indexOf(val.type) === -1)
134134
.map(val => getFormattedChangelogEntry(val))
135135
.reduce((acc, line) => `${acc}\n${line}`, '');
136136
if (commits) {

0 commit comments

Comments
 (0)