fix: parse only subject line to avoid body-content parser failures

Merged
VI
8mo ago
+38-28

Summary

The @conventional-commits/parser chokes on nested parentheses in commit message bodies (e.g. `foo(a, bar(b))`), misinterpreting them as conventional commit type(scope) syntax. This has been causing recurring release workflow failures in openapi-generation since the changelog action was re-added on Feb 4.

Failed releases traced to this bug

TagCommitBody content that broke the parser
v2.850.8b691a47`serialized.get(k, serialized.get(n))`
v2.849.54e50d51Revert "fix(java):..." (not conventional format)
(Mar 2)0728b3b`SetExtensionOnExclusiveTypes(ResponseShard, RequestShard,`
(Mar 2)e8c99f1`slices.Sorted(maps.Keys(...))`
(Feb 20)7ec9d91`slices.Concat(os.Environ(), ...)`

Fix

Parse only the first line (subject) for type/scope/subject extraction. The action only uses these fields from the parsed AST — the body content is irrelevant for changelog generation. BREAKING CHANGE detection is handled with a simple regex on the full message instead of relying on the parser's footer handling.

Test plan

  • Verified all 5 previously-failing commit messages now parse correctly
  • BREAKING CHANGE detection works for both BREAKING CHANGE: and BREAKING-CHANGE: footer formats
  • Normal conventional commits continue to parse identically

šŸ¤– Generated with Claude Code