@@ -52,48 +52,50 @@ commit_preprocessors = [
5252 { pattern = ' ^\s+|\s+$' , replace = " " },
5353]
5454# regex for parsing and grouping commits
55+ # Note: Patterns use (^|\\n) to match at start of any line because with split_commits=true,
56+ # the commit_parsers are matched against the full commit message BEFORE splitting into lines.
5557commit_parsers = [
5658 # Breaking changes - highest priority
57- { message = " (?i)^ BREAKING[:\\ s]" , group = " Breaking Changes" },
59+ { message = " (^| \\ n)( ?i)BREAKING[:\\ s]" , group = " Breaking Changes" },
5860 { message = " (?i)\\ [BREAKING\\ ]" , group = " Breaking Changes" },
5961 { body = " (?i)BREAKING CHANGE" , group = " Breaking Changes" },
6062
6163 # Security fixes
62- { message = " (?i)^ SECURITY[:\\ s]" , group = " Security" },
64+ { message = " (^| \\ n)( ?i)SECURITY[:\\ s]" , group = " Security" },
6365 { message = " (?i)\\ [SECURITY\\ ]" , group = " Security" },
6466
6567 # Bug fixes
66- { message = " (?i)^ BUG[:\\ s]" , group = " Bug Fixes" },
68+ { message = " (^| \\ n)( ?i)BUG[:\\ s]" , group = " Bug Fixes" },
6769 { message = " (?i)\\ [BUG\\ ]" , group = " Bug Fixes" },
6870
6971 # Features
70- { message = " (?i)^ FEAT[:\\ s]" , group = " Features" },
71- { message = " (?i)^ FEATURE[:\\ s]" , group = " Features" },
72+ { message = " (^| \\ n)( ?i)FEAT[:\\ s]" , group = " Features" },
73+ { message = " (^| \\ n)( ?i)FEATURE[:\\ s]" , group = " Features" },
7274 { message = " (?i)\\ [FEAT\\ ]" , group = " Features" },
7375
7476 # Documentation
75- { message = " (?i)^ DOCS[:\\ s]" , group = " Documentation" },
76- { message = " (?i)^ DOC[:\\ s]" , group = " Documentation" },
77+ { message = " (^| \\ n)( ?i)DOCS[:\\ s]" , group = " Documentation" },
78+ { message = " (^| \\ n)( ?i)DOC[:\\ s]" , group = " Documentation" },
7779 { message = " (?i)\\ [DOCS\\ ]" , group = " Documentation" },
7880
7981 # Refactoring
80- { message = " (?i)^ REFACTOR[:\\ s]" , group = " Refactoring" },
82+ { message = " (^| \\ n)( ?i)REFACTOR[:\\ s]" , group = " Refactoring" },
8183 { message = " (?i)\\ [REFACTOR\\ ]" , group = " Refactoring" },
8284
8385 # Performance
84- { message = " (?i)^ PERF[:\\ s]" , group = " Performance" },
86+ { message = " (^| \\ n)( ?i)PERF[:\\ s]" , group = " Performance" },
8587 { message = " (?i)\\ [PERF\\ ]" , group = " Performance" },
8688
8789 # Testing
88- { message = " (?i)^ TEST[:\\ s]" , group = " Testing" },
90+ { message = " (^| \\ n)( ?i)TEST[:\\ s]" , group = " Testing" },
8991 { message = " (?i)\\ [TEST\\ ]" , group = " Testing" },
9092
9193 # Build/CI
92- { message = " (?i)^ CI[:\\ s]" , group = " Build" },
94+ { message = " (^| \\ n)( ?i)CI[:\\ s]" , group = " Build" },
9395 { message = " (?i)\\ [CI\\ ]" , group = " Build" },
9496
9597 # Chores
96- { message = " (?i)^ CHORE[:\\ s]" , group = " Miscellaneous" },
98+ { message = " (^| \\ n)( ?i)CHORE[:\\ s]" , group = " Miscellaneous" },
9799 { message = " (?i)\\ [CHORE\\ ]" , group = " Miscellaneous" },
98100]
99101# protect breaking changes from being skipped due to matching a skipping commit_parser
0 commit comments