Skip to content

feat: add setting to define extra prefix / conventional-commit type mapping#2624

Open
rabadin wants to merge 1 commit intogoogleapis:mainfrom
rabadin:non-conv-commit-support
Open

feat: add setting to define extra prefix / conventional-commit type mapping#2624
rabadin wants to merge 1 commit intogoogleapis:mainfrom
rabadin:non-conv-commit-support

Conversation

@rabadin
Copy link

@rabadin rabadin commented Nov 20, 2025

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
  • 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 #2623.
Fixes #2385.

@product-auto-label product-auto-label bot added the size: m Pull request size is medium. label Nov 20, 2025
@rabadin rabadin force-pushed the non-conv-commit-support branch 2 times, most recently from 1d8cc63 to d3dd338 Compare November 20, 2025 18:09
@rabadin rabadin force-pushed the non-conv-commit-support branch 2 times, most recently from d6386d4 to 21f3469 Compare November 24, 2025 15:04
@rabadin rabadin marked this pull request as ready for review November 24, 2025 15:56
@rabadin rabadin requested review from a team as code owners November 24, 2025 15:56
@rabadin rabadin changed the title feat: add non-conventional-commit-type setting for legacy commits feat: add setting to define extra prefix / conventional-commit type mapping Nov 24, 2025
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.
@rabadin rabadin force-pushed the non-conv-commit-support branch from 21f3469 to bd7b9ec Compare January 5, 2026 14:46
…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.
@rabadin rabadin force-pushed the non-conv-commit-support branch from bd7b9ec to 0f00c1c Compare January 12, 2026 11:20
@ferrarimarco
Copy link
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?

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

Labels

size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Support for Non-Conventional Commits [Feature Request] Support emoji in commit message

3 participants