Skip to content

Commit ef06c76

Browse files
committed
feat: add atom
1 parent 8afa924 commit ef06c76

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

lib/detectors.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ export default {
1313
return true;
1414
}
1515
},
16+
atom: (commit) => {
17+
let match = commit.match(regex.atom);
18+
19+
if (match) {
20+
return true;
21+
}
22+
23+
return commit.match(/^Prepare (.*?) release$/);
24+
},
1625
ember: (commit) => {
1726
return commit.match(regex.ember);
1827
},

lib/regex.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export default {
22
angular: /^(\w*)(?:\((.*)\))?\: (.*)$/,
3+
atom: /^(:.*?:) (.*)$/,
34
ember: /^\[(.*) (.*)] (.*)$/,
45
eslint: /^(\w*)\: (.*?)(?:\((.*)\))?$/,
56
jquery: /^(\w*)\: ([^\(]*)$/,

test/index.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@ it('should be angular', function () {
1414
equal(conventionalCommitsDetector(commits), 'angular');
1515
});
1616

17+
it('should be atom', function () {
18+
let commits = [
19+
':memo: Fix license',
20+
':memo: Add a screenshot',
21+
':fire: init',
22+
'Prepare 0.0.1 release'
23+
];
24+
25+
equal(conventionalCommitsDetector(commits), 'atom');
26+
});
27+
1728
it('should be ember', function () {
1829
let commits = [
1930
'[BUGFIX beta] Guard `meta` and move readonly error to prototype.',

0 commit comments

Comments
 (0)