feat: map Conventional Commit types to an increment type - #283
Merged
Merged
Conversation
Kevin-de-Jong
force-pushed
the
feat/increment-mapping
branch
from
September 16, 2026 13:10
e069657 to
8b753e6
Compare
The Release configuration was defined in `changelog.ts`, which is fine as long as only the changelog uses it; `versioning.ts` already reached across for `IReleaseConfiguration` though. Moved to `src/configuration.ts`. `getConfiguration` now takes the default configuration instead of a `VersionScheme`, so both `changelog` and `versioning` depend on `configuration` and no longer on each other. No functional changes - the configuration is still retrieved from `.github/release.yml` in exactly the same way. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Kevin-de-Jong
force-pushed
the
feat/increment-mapping
branch
from
September 16, 2026 13:13
8b753e6 to
5153778
Compare
Only `feat` and `fix` increment the version; getting a release out of eg. a
`chore` requires logic in the workflow which determines the increment type up
front.
Both the `increment-mapping` input parameter and the identical
`increment-mapping` item in the Release configuration file now map types to an
increment type; eg.
increment-mapping: |
chore: PATCH
docs: PATCH
Both are merged per type on top of the defaults - the input parameter takes
precedence - and the largest increment of all commits in the release is
applied. Supported increment types are `MAJOR`, `MINOR`, `PATCH` and `NONE`;
the input parameter accepts YAML as well as JSON.
Breaking changes remain `MAJOR` and scopes are not supported. The mapping is
ignored, with a warning, for `calver`; every change already results in an
increment of the Calendar Version there.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Kevin-de-Jong
force-pushed
the
feat/increment-mapping
branch
from
September 16, 2026 13:18
5153778 to
15de0f0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We only increment on
featandfix; getting a release out of eg. achorecurrently requires logic in the workflow which determines the increment type up front. Which also means we end up with empty release notes, asincrement-typeskips the commit analysis entirely.This adds an increment mapping, available both as
increment-mappinginput parameter and as an identicalincrement-mappingitem in the Release configuration file;feat->MINOR,fix->PATCH); the input parameter takes precedence, so we can override a single type from a workflow without repeating the full mappingMAJOR,MINOR,PATCHandNONE; the largest increment of all commits in the release is appliedFIX: majorworksMAJOR, regardless of the mappingchore(deps): PATCHis rejected instead of silently never matchingcalver- every change already results in an increment of the Calendar Version thereSplit in two commits; the first one only moves the Release configuration out of
changelog.tsintosrc/configuration.ts, asversioning.tsneeds it as well now.getConfigurationtakes the default configuration instead of aVersionSchemethere, sochangelogandversioningno longer depend on each other.Worth being aware of - the changelog categories are based on the resulting increment type, so a type mapped to
PATCHalso shows up in any category selectingincrement: ["PATCH"](eg. our own "🐛 Bug Fixes"). Documented indocs/configuration.md; happy to add atypesbased escape hatch if we want one.60 tests (15 new),
lib/rebuilt.🤖 Generated with Claude Code