Skip to content

feat: add custom scheme support#181

Open
pboulos wants to merge 4 commits into
autotag-dev:mainfrom
pboulos:feat/add-custom-scheme-support
Open

feat: add custom scheme support#181
pboulos wants to merge 4 commits into
autotag-dev:mainfrom
pboulos:feat/add-custom-scheme-support

Conversation

@pboulos
Copy link
Copy Markdown

@pboulos pboulos commented Apr 20, 2026

Adds support for user-defined commit parsing schemes via --scheme-file <path-to-yaml>, alongside the existing autotag and conventional built-ins.

Users write a YAML file with an ordered list of regex rules, each mapping to major/minor/patch/none, plus a required default for unmatched commits. Rules are evaluated top-down, first match wins; validation (regex compilation, allowed bump values, required fields, unknown keys) happens at load time so malformed schemes fail fast with clear errors. Matched rules and applied defaults are logged by name for easier debugging.

Internally, scheme selection is refactored behind a new Scheme interface, and --scheme-file is mutually exclusive with an explicitly non-default --scheme. Reference files under examples/schemes/ reproduce both built-in schemes as a starting point, and testdata/schemes/ fixtures dogfood the same clones end-to-end against the existing test suite.

Resolves the following issue: #30

@pboulos
Copy link
Copy Markdown
Author

pboulos commented Apr 28, 2026

@joemiller @spheromak just wanted to check if this was a feature you were interested in supporting?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant