From 6b91677aa21740d8525559d0750711ee5e2620cf Mon Sep 17 00:00:00 2001 From: Michael Lorant Date: Sun, 3 Mar 2024 19:49:51 +1100 Subject: [PATCH] =?UTF-8?q?=E2=9A=99=EF=B8=8F=20Switch=20emoji=20type=20de?= =?UTF-8?q?fault?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The default emoji type is set to shortcode which was based on how this was configured in the Gitmoji CLI tool. Gitmoji has now changed the default from shortcode to character. This change switches the default to stay consistent. --- README.md | 4 ++-- internal/config/emoji.go | 2 +- internal/config/emoji_test.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3742008..080e581 100644 --- a/README.md +++ b/README.md @@ -238,8 +238,8 @@ view: commit: # Emoji format in commit. # Values: shortcode, character - # Default: shortcode - emojiType: shortcode + # Default: character + emojiType: character # Enable author sign-off for commits. # Values: true, false diff --git a/internal/config/emoji.go b/internal/config/emoji.go index 06cec60..96f169a 100644 --- a/internal/config/emoji.go +++ b/internal/config/emoji.go @@ -75,7 +75,7 @@ func (e EmojiType) MarshalYAML() (interface{}, error) { } func (e EmojiType) Default() int { - return 1 + return 2 } func (e EmojiType) Index() int { diff --git a/internal/config/emoji_test.go b/internal/config/emoji_test.go index a7cb7bd..5707cd4 100644 --- a/internal/config/emoji_test.go +++ b/internal/config/emoji_test.go @@ -207,7 +207,7 @@ func TestIndexEmojiType(t *testing.T) { input config.EmojiType want int }{ - {name: "unset", input: config.EmojiType(config.EmojiTypeUnset), want: 1}, + {name: "unset", input: config.EmojiType(config.EmojiTypeUnset), want: 2}, {name: "shortcode", input: config.EmojiType(config.EmojiTypeShortcode), want: 1}, {name: "character", input: config.EmojiType(config.EmojiTypeCharacter), want: 2}, }