From 75c7b6c058f822e3f7f81eef5ba48bf87e344c07 Mon Sep 17 00:00:00 2001 From: Mikhail Lukianchenko <42915+mikluko@users.noreply.github.com> Date: Tue, 13 Aug 2024 19:37:14 +0200 Subject: [PATCH 1/2] fix: improve conditional execution of git commit - Add check for `GIT_INDEX_FILE` environment variable to conditionally skip automatic git commit - Ensure git commit is executed only if not running from within a hook --- cmd/commit.go | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/cmd/commit.go b/cmd/commit.go index b1d8109..d9dee58 100644 --- a/cmd/commit.go +++ b/cmd/commit.go @@ -320,13 +320,17 @@ var commitCmd = &cobra.Command{ } } - // git commit automatically - color.Cyan("Git record changes to the repository") - output, err := g.Commit(commitMessage) - if err != nil { - return err + noCommit := os.Getenv("GIT_INDEX_FILE") != "" + + // git commit automatically unless running from within hook + if !noCommit { + color.Cyan("Git record changes to the repository") + output, err := g.Commit(commitMessage) + if err != nil { + return err + } + color.Yellow(output) } - color.Yellow(output) return nil }, } From b4d39f223681ca6ac50be0b5cba3b8341cc15355 Mon Sep 17 00:00:00 2001 From: Mikhail Lukianchenko <42915+mikluko@users.noreply.github.com> Date: Wed, 14 Aug 2024 09:06:49 +0200 Subject: [PATCH 2/2] feat: add support for Russian language - Add support for Russian language in languageMaps --- prompt/language.go | 1 + 1 file changed, 1 insertion(+) diff --git a/prompt/language.go b/prompt/language.go index b8909dd..7f3b066 100644 --- a/prompt/language.go +++ b/prompt/language.go @@ -9,6 +9,7 @@ var languageMaps = map[string]string{ "ja": "Japanese", "pt": "Portuguese", "pt-br": "Brazilian Portuguese", + "ru": "Russian", } // GetLanguage returns the language name for the given language code,