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>
This commit is contained in:
Umut Önder
2025-04-17 04:47:04 +02:00
committed by GitHub
parent 11348408da
commit 37f4e960ae
2 changed files with 0 additions and 11 deletions

View File

@@ -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
</commit_analysis>
4. Create the commit with a message ending with:
🤖 Generated with [avante.nvim](https://github.com/yetone/avante.nvim)
Co-Authored-By: avante.nvim <noreply-avante@yetone.ai>
- In order to ensure good formatting, ALWAYS pass the commit message via a HEREDOC, a la this example:
<example>
git commit -m "$(cat <<'EOF'
Commit message here.
🤖 Generated with [avante.nvim](https://github.com/yetone/avante.nvim)
Co-Authored-By: avante.nvim <noreply-avante@yetone.ai>
EOF
)"
</example>
@@ -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
)"
</example>

View File

@@ -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 <noreply-avante@yetone.ai>"
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