Files
4644e5f1da feat(parser): allow commits to be parsed by multiple parsers (#1611)
* feat(parser): allow commits to be parsed by multiple parsers

Add an opt-in `continue` field to commit parsers. When set, parsing
keeps going after a parser matches, so a commit can be handled by more
than one parser in order (e.g. one sets the scope, the next sets the
group). Default behavior is unchanged: the first matching parser wins
and short-circuits.

* fix(parser): keep fields set by earlier parsers when a later one matches

A terminal parser (one without continue) used to overwrite group, scope
and default_scope wholesale, so a scope set by a preceding continue
parser was reset to None when a later parser only matched to set the
group. Make terminal parsers override just the fields they set, matching
the sha-based match path, so composing parsers augment instead of
clobbering each other.

Add a unit case and a test-multiple-commit-parsers fixture that derive a
scope from a git footer and then group by conventional type, and update
the docs with that real-world use case.

* docs(parser): shorten the multiple-parser section and note the match caveat

Trim the git.md write-up to a short example and move the fuller
walkthrough to tips and tricks. Document that parser matching evaluates
against the original commit, so a later parser cannot match on a field
set by an earlier one.

* fix(parser): preserve legacy terminal parser behavior

* docs: polish documentation

---------

Co-authored-by: Chris (ChrisJr404) <[email protected]>
Co-authored-by: Orhun Parmaksız <[email protected]>
2026-09-06 15:22:30 +03:00
..