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

Commit 175e727

Browse files
committed
chore(validate-commit-msg): allow * and - in scope string
1 parent d938983 commit 175e727

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

validate-commit-msg.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ var util = require('util');
1313

1414

1515
var MAX_LENGTH = 70;
16-
var PATTERN = /^(\w*)(\(([\w\$\.]*)\))?\: (.*)$/;
16+
var PATTERN = /^(\w*)(\(([\w\$\.\-\*]*)\))?\: (.*)$/;
1717
var IGNORED = /^WIP\:/;
1818
var TYPES = {
1919
feat: true,

validate-commit-msg.spec.js

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ describe('validate-commit-msg.js', function() {
2929
expect(m.validateMessage('refactor($httpBackend): something')).toBe(VALID);
3030
expect(m.validateMessage('test($resource): something')).toBe(VALID);
3131
expect(m.validateMessage('chore($controller): something')).toBe(VALID);
32+
expect(m.validateMessage('chore(foo-bar): something')).toBe(VALID);
33+
expect(m.validateMessage('chore(*): something')).toBe(VALID);
3234
expect(errors).toEqual([]);
3335
});
3436

0 commit comments

Comments
 (0)