fix: parse only subject line to avoid body-content parser failures
Merged
VI
8mo ago+38+38+01234567890123456789-28-28-01234567890123456789
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
| Tag | Commit | Body content that broke the parser |
|---|---|---|
| v2.850.8 | b691a47 | `serialized.get(k, serialized.get(n))` |
| v2.849.5 | 4e50d51 | Revert "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:andBREAKING-CHANGE:footer formats - Normal conventional commits continue to parse identically
š¤ Generated with Claude Code