Skip to content
This repository was archived by the owner on Jan 14, 2026. It is now read-only.

Commit 47f8562

Browse files
committed
style(gitcommit): improve code formatting consistency
1 parent 762c929 commit 47f8562

2 files changed

Lines changed: 6 additions & 13 deletions

File tree

lua/codecompanion/_extensions/gitcommit/prompts/release_notes.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,9 @@ function M.create_smart_prompt(commits, style, version_info)
131131
for name, count in pairs(analysis.contributors) do
132132
table.insert(contributor_list, { name = name, count = count })
133133
end
134-
table.sort(contributor_list, function(a, b) return a.count > b.count end)
134+
table.sort(contributor_list, function(a, b)
135+
return a.count > b.count
136+
end)
135137

136138
if #contributor_list > 0 then
137139
local names = {}

lua/codecompanion/_extensions/gitcommit/tools/ai_release_notes.lua

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,7 @@ local function get_detailed_commits(from_ref, to_ref)
5858
local escaped_range = vim.fn.shellescape(range)
5959

6060
local separator = "---COMMIT_SEPARATOR---"
61-
local commit_cmd = string.format(
62-
"git log --pretty=format:'%%H||%%s||%%an||%%b%s' %s",
63-
separator,
64-
escaped_range
65-
)
61+
local commit_cmd = string.format("git log --pretty=format:'%%H||%%s||%%an||%%b%s' %s", separator, escaped_range)
6662

6763
local success, output = pcall(vim.fn.system, commit_cmd)
6864
if not success or vim.v.shell_error ~= 0 then
@@ -222,13 +218,8 @@ AIReleaseNotes.cmds = {
222218

223219
local prompt = prompts.create_smart_prompt(commits, style, { from = from_tag, to = to_tag })
224220

225-
local user_msg = string.format(
226-
"📝 Generating %s release notes: %s → %s (%d commits)",
227-
style,
228-
from_tag,
229-
to_tag,
230-
#commits
231-
)
221+
local user_msg =
222+
string.format("📝 Generating %s release notes: %s → %s (%d commits)", style, from_tag, to_tag, #commits)
232223

233224
local llm_msg = string.format("<aiReleaseNotes>\n%s\n</aiReleaseNotes>", prompt)
234225

0 commit comments

Comments
 (0)