Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

Commit

Permalink
fix: 🐛 don't add emoji to head only when "disableEmoji" is true
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Jul 1, 2019
1 parent 448873e commit 45489c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .git-cz.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"disableEmoji": false
}
6 changes: 3 additions & 3 deletions lib/formatCommitMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ const formatCommitMessage = (state) => {
scope = `(${answers.scope})`;
}

if (!config.disableEmoji) {
if (config.disableEmoji) {
head = answers.type + scope + ': ' + answers.subject;
} else {
const emoji = config.types[answers.type].emoji;
const emojiPrefix = emoji ? emoji + ' ' : '';

head = answers.type + scope + ': ' + emojiPrefix + answers.subject;
}

head = answers.type + scope + ': ' + answers.subject;

const affectsLine = makeAffectsLine(answers);

// Wrap these lines at MAX_LINE_WIDTH character
Expand Down

0 comments on commit 45489c8

Please sign in to comment.