Skip to content

Commit

Permalink
feat(Emoji): Support for emoji-code for headlines added
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksej Wesselbaum committed Oct 20, 2019
1 parent d9d06ad commit c346f95
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 deletions.
6 changes: 3 additions & 3 deletions cglconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
"searchValue": {
"regexBody": "BREAKING CHANGE"
},
"headline": "Breaking changes"
"headline": ":boom: Breaking changes"
},
{
"searchValue": {
"regexBody": "^feat"
},
"headline": "Features"
"headline": ":sparkles: Features"
},
{
"searchValue": {
"regexBody": "^fix"
},
"headline": "Fixes"
"headline": ":bug: Fixes"
}
],
"groupTemplate": "## %_headline",
Expand Down
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const origin = require('remote-origin-url');
const gitRemote = require('git-remote-protocol');
const argv = require('yargs').argv;
const fs = require('fs');
const emoji = require('node-emoji');

if (argv.v) {
console.log(JSON.parse(fs.readFileSync('./package.json')));
Expand All @@ -30,6 +31,8 @@ commitsSince.commitsSince(options.since, options.format).then(function (rawCommi
for (let headline in groupedCommits) {
if (groupedCommits[headline].length > 0 || options.outputEmptyGroup) {

console.log(emoji.emojify(headline));

for (let i = 0; i < groupedCommits[headline].length; i++) {
console.log(groupedCommits[headline][i].interpolatedCommitMessage);
}
Expand Down
16 changes: 15 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"git-raw-commits": "^2.0.0",
"git-remote-protocol": "^0.1.0",
"lodash": "^4.17.5",
"node-emoji": "^1.10.0",
"parse-commit-message": "^3.2.3",
"remote-origin-url": "^2.0.0",
"replace-string": "^3.0.0",
Expand Down

0 comments on commit c346f95

Please sign in to comment.