feat: add setting to define extra prefix / conventional-commit type mapping#2624
Open
rabadin wants to merge 1 commit intogoogleapis:mainfrom
Open
feat: add setting to define extra prefix / conventional-commit type mapping#2624rabadin wants to merge 1 commit intogoogleapis:mainfrom
rabadin wants to merge 1 commit intogoogleapis:mainfrom
Conversation
1d8cc63 to
d3dd338
Compare
d6386d4 to
21f3469
Compare
Destreyf
added a commit
to Fields-Education/release-please
that referenced
this pull request
Jan 1, 2026
Cherry-picked from googleapis#2624 by @rabadin. This adds support for mapping arbitrary commit prefixes (including empty string for non-conventional commits) to conventional commit types. Example config: { "extra-prefix-mapping": { "": "chore" } } This treats all non-conventional commits as 'chore' type, ensuring they are included in releases instead of being silently ignored.
21f3469 to
bd7b9ec
Compare
…nventional commit types Add `extra-prefix-mapping` configuration to map arbitrary commit prefixes to conventional commit types, enabling flexible handling of various commit message conventions. This change enables release-please to handle various commit message conventions by providing a flexible mapping mechanism. Key use cases include: - **Emoji-based commits**: Map emoji prefixes (e.g., 🐛, ✨, 📝) to conventional types when using workflows like [gitmoji](https://github.com/arvinxx/gitmoji-commit-workflow) - **Custom commit prefixes**: Map organization-specific prefixes (e.g., "change:", "update:") to conventional types - **Legacy code integration**: Handle non-conventional commits when merging legacy codebases by mapping the empty string ("") to a default type Fully backward compatible - feature disabled by default. Fixes googleapis#2623. Fixes googleapis#2385.
bd7b9ec to
0f00c1c
Compare
Collaborator
|
Hi @rabadin, thanks for this PR. If I get this PR right, you're proposing to add a field that allows for arbitrary mapping of commit types to conventional commit types. Is this correct? How would this work with breaking changes? |
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.
Add
extra-prefix-mappingconfiguration to map arbitrary commit prefixes to conventionalcommit types, enabling flexible handling of various commit message conventions.
This change enables release-please to handle various commit message conventions
by providing a flexible mapping mechanism. Key use cases include:
when using workflows like gitmoji
by mapping the empty string ("") to a default type
Fully backward compatible - feature disabled by default.
Fixes #2623.
Fixes #2385.