Skip to content

Commit

Permalink
fix: ignore semver commits with chore type
Browse files Browse the repository at this point in the history
Closes #198
  • Loading branch information
satazor authored and marionebl committed Dec 21, 2017
1 parent d82cbd4 commit cdbb085
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions @commitlint/core/src/library/is-ignored.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const WILDCARDS = [
c
.split('\n')
.shift()
.replace(/^chore(\([^)]+\))?:/, '')
.trim()
)
];
Expand Down
7 changes: 7 additions & 0 deletions @commitlint/core/src/library/is-ignored.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ test('should ignore npm semver commits', t => {
VERSION_MESSAGES.forEach(message => t.true(isIgnored(message)));
});

test('should ignore npm semver commits with chore', t => {
VERSION_MESSAGES.forEach(message => t.true(isIgnored(`chore: ${message}`)));
VERSION_MESSAGES.forEach(message =>
t.true(isIgnored(`chore(release): ${message}`))
);
});

test('should ignore npm semver commits with footers', t => {
AMENDED_VERSION_MESSAGES.forEach(message => t.true(isIgnored(message)));
});
Expand Down

0 comments on commit cdbb085

Please sign in to comment.