-
-
Notifications
You must be signed in to change notification settings - Fork 18
feat(changelog): Strip commit patterns from changelog entries #674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
…tries By default, conventional commit type prefixes (e.g., 'feat(api): ') are now stripped from changelog entries. The scope is preserved when entries aren't grouped under a scope header. This is controlled via named capture groups in commit_patterns: - (?<type>...) - The prefix to strip - (?<scope>...) - The scope to preserve when no scope header is shown Users can disable stripping by using non-capturing groups in their patterns.
Contributor
Suggested Version Bump🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨Changelog
OtherDocumentation 📚🤖 This preview updates automatically when you update the PR. |
Contributor
|
Previously, 'Other' header for scopeless entries was only shown when there were scopes with 2+ entries (getting their own header). This caused confusion when a single unscoped entry appeared after a scope header, looking like it was part of that scope. Now 'Other' header is shown whenever there are any scoped entries, except when scopeless is the only group (where 'Other' would be meaningless).
When a scope has 2+ entries it gets its own header (e.g., '#### Api'). Single-scope entries and scopeless entries now go under an 'Other' header to clearly separate them from the grouped scopes. This prevents confusion where single entries appeared to belong to the previous scope's header.
- Test that single-scope entries get 'Other' header when scope groups exist - Test that no 'Other' header when only scopeless entries - Test that no 'Other' header when all scopes are single-entry
MathurAditya724
approved these changes
Dec 28, 2025
This was referenced Dec 28, 2025
7 tasks
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.
Summary
Adds automatic stripping of conventional commit type prefixes from changelog entries. When PRs are grouped into categories (and optionally by scope), the prefix becomes redundant and is now removed by default.
How It Works
This uses named capture groups in
commit_patterns:(?<type>...)- The prefix to strip (includes type, scope, and colon)(?<scope>...)- The scope to preserve when not under a scope headerfeat(api): add endpointAdd endpointfeat(api): add endpoint(api) Add endpointfeat: add endpointAdd endpointChanges
DEFAULT_RELEASE_CONFIGpatterns with named capture groupsCategoryMatchResultto track matched pattern during categorizationstripTitle()helper for context-aware title strippingserializeChangelog()with scope header contextstripTitle()functionalityOpt-out
Users can disable stripping by providing custom patterns without named groups: