From 37f4e960aeec36d1edbc57a37d8c16cb28a7bb3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Umut=20=C3=96nder?= <93402298+umutondersu@users.noreply.github.com> Date: Thu, 17 Apr 2025 04:47:04 +0200 Subject: [PATCH] chores: remove advertising from commit messages (#1886) Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> --- lua/avante/llm_tools/bash.lua | 8 -------- lua/avante/llm_tools/init.lua | 3 --- 2 files changed, 11 deletions(-) diff --git a/lua/avante/llm_tools/bash.lua b/lua/avante/llm_tools/bash.lua index 971387e..b51e871 100644 --- a/lua/avante/llm_tools/bash.lua +++ b/lua/avante/llm_tools/bash.lua @@ -103,17 +103,10 @@ When the user asks you to create a new git commit, follow these steps carefully: - Review the draft message to ensure it accurately reflects the changes and their purpose -4. Create the commit with a message ending with: -🤖 Generated with [avante.nvim](https://github.com/yetone/avante.nvim) -Co-Authored-By: avante.nvim - - In order to ensure good formatting, ALWAYS pass the commit message via a HEREDOC, a la this example: git commit -m "$(cat <<'EOF' Commit message here. - - 🤖 Generated with [avante.nvim](https://github.com/yetone/avante.nvim) - Co-Authored-By: avante.nvim EOF )" @@ -175,7 +168,6 @@ gh pr create --title "the pr title" --body "$(cat <<'EOF' ## Test plan [Checklist of TODOs for testing the pull request...] -🤖 Generated with [avante.nvim](https://github.com/yetone/avante.nvim) EOF )" diff --git a/lua/avante/llm_tools/init.lua b/lua/avante/llm_tools/init.lua index b141774..e833697 100644 --- a/lua/avante/llm_tools/init.lua +++ b/lua/avante/llm_tools/init.lua @@ -451,10 +451,7 @@ function M.git_commit(opts, on_log, on_complete) for line in opts.message:gmatch("[^\r\n]+") do commit_msg_lines[#commit_msg_lines + 1] = line:gsub('"', '\\"') end - commit_msg_lines[#commit_msg_lines + 1] = "" - commit_msg_lines[#commit_msg_lines + 1] = "🤖 Generated with [avante.nvim](https://github.com/yetone/avante.nvim)" - commit_msg_lines[#commit_msg_lines + 1] = "Co-Authored-By: avante.nvim " if git_user ~= "" and git_email ~= "" then commit_msg_lines[#commit_msg_lines + 1] = string.format("Signed-off-by: %s <%s>", git_user, git_email) end