Repository navigation
fix(changelog): normalize leading branch prefixes in PR titles - #225
Merged
Merged
Conversation
Remove stacked stable-version and master prefixes from the start of PR titles without consuming the opening bracket of the next tag. Require complete, matching delimiters and leave branch-like text elsewhere in titles untouched. Assisted-by: Copilot:gpt-6.1-terra Signed-off-by: Josh <josh.t.richards@gmail.com>
blizzz
requested changes
Nov 9, 2026
blizzz
left a comment
Member
There was a problem hiding this comment.
There is one regression on the security tag: The new regex only matches at ^, and the [security] strip runs after it, once. So a title starting with [security] never gets its branch tags removed.
Suggested fix: handle security inside the same repeating prefix group, so prefixes in any order are removed in one pass. Then delete line 68:
'!^(?:(?:\[(?:(?:stable)? ?\d\d|master|main|security)\]|\((?:(?:stable)? ?\d\d|master|main)\))[\s:,-]*)+!i'
Handle leading security and branch prefixes in the same repeating group so a security prefix cannot prevent branch cleanup. Also recognize main as a branch prefix. Signed-off-by: Josh <josh.t.richards@gmail.com>
Add tests for prefix ordering, stacked tags, and titles that should remain unchanged. Assisted-by: Copilot:gpt-6.1-terra Signed-off-by: Josh <josh.t.richards@gmail.com>
Member
Author
|
Good call. Totally overlooked the interaction. Also, makes sense to include Fixed (hopefully) and also added test coverage. :) |
skjnldsv
approved these changes
Nov 10, 2026
blizzz
approved these changes
Nov 11, 2026
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.
Fix title cleanup consuming the opening bracket of a second prefix; also treat a
[master]prefix in the same manner as[stableXX].These problems are visible in the v33.0.10 changelog, where one entry begins with
Stable35]and two begin withMaster].The current regex:
\W*that matches any non-word character, including the opening[of a second bracketed prefix. For example, the viewer PR title is[stable33] [stable35] fix: ...; after removing the first prefix, the regex also consumes the second[, leavingstable35] fix: ...as the entry.[stable33or mismatched delimiters such as[stable33).Fix [stable33] thingbecomesFix thing.The updated title cleanup removes consecutive leading branch prefixes without stripping the opening bracket from an unrecognized tag. It also treats
masterin the same way asstableXX.The cleanup now requires matching delimiters - i.e. no mismatched combinations like
[stableXX)- and leaves branch-like text elsewhere in titles untouched.🤖 AI (if applicable)