From 45489c8045fa4d9464441b2393cccdca8f7dbbba Mon Sep 17 00:00:00 2001 From: streamich Date: Mon, 1 Jul 2019 20:23:12 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20don't=20add=20emoji=20to?= =?UTF-8?q?=20head=20only=20when=20"disableEmoji"=20is=20true?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .git-cz.json | 3 +++ lib/formatCommitMessage.js | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 .git-cz.json diff --git a/.git-cz.json b/.git-cz.json new file mode 100644 index 00000000..92137901 --- /dev/null +++ b/.git-cz.json @@ -0,0 +1,3 @@ +{ + "disableEmoji": false +} diff --git a/lib/formatCommitMessage.js b/lib/formatCommitMessage.js index af269fe9..cb9998ea 100644 --- a/lib/formatCommitMessage.js +++ b/lib/formatCommitMessage.js @@ -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