Skip to content

Commit 2bd4457

Browse files
committed
fix(git): improve commit type parsing in release notes
- update regex to support Conventional Commits with scopes - ensure features are correctly categorized when scope is present
1 parent 7f6815f commit 2bd4457

File tree

1 file changed

+1
-1
lines changed
  • lua/codecompanion/_extensions/gitcommit/tools

1 file changed

+1
-1
lines changed

lua/codecompanion/_extensions/gitcommit/tools/git.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ function GitTool.generate_release_notes(from_tag, to_tag, format)
791791
local others = {}
792792

793793
for _, commit in ipairs(commits) do
794-
local type_match = commit.subject:match("^(%w+):")
794+
local type_match = commit.subject:match("^(%w+)%(.*%):") or commit.subject:match("^(%w+):")
795795
if type_match then
796796
if type_match == "feat" or type_match == "feature" then
797797
table.insert(features, commit)

0 commit comments

Comments
 (0)