Repository navigation
Strip conventional-commit title prefixes and capitalize titles - #4445
Merged
Merged
Conversation
Extend extract.strip_title_prefix to remove fix:, feat(scope): and similar prefixes after square-bracket prefixes, then capitalize the first letter unless the first word looks like code. Related to elastic/docs-eng-team#1036 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4445/ Sample changed pages: |
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
akira28
approved these changes
Oct 14, 2026
Mpdreamz
requested changes
Oct 14, 2026
Adds matchTimeoutMilliseconds: 2000, the value CallOutParser already uses, to the conventional-commit prefix regex and to the two older regexes in the same class. A test fails if a regex in the class has no timeout. Related to elastic/docs-eng-team#1036 Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RyiyHmDHcUFt8rjMNR8TBm
Mpdreamz
approved these changes
Oct 14, 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.
While reviewing the automated Kibana Serverless bundle in elastic/docs-internal-workflows#1051, I found that
changelog addleaves PR titles likefix(apm): …,feat(cases): …,Fix: …andfix create visualization …untouched.extract.strip_title_prefixonly handles a leading[Bracket]prefix.This PR extends that option. When it is
true, title cleanup now runs three steps in order: strip[Bracket]prefixes (unchanged), strip a conventional-commit prefix (feat,fix,docs,chore,refactor,perf,test,style,build,ci,revert, with an optional scope and!), then capitalize the first letter. The prefix is removed only when text follows it, and the entrytypealready carries the same information. Capitalization skips titles whose first word looks like code (digits, underscores, dots, backticks or inner capitals), so identifiers such askibana.alert.rulekeep their casing.The change lives in
ChangelogTextUtilities.StripTitlePrefix, and all five existing call sites now use it. Verb-form rewrites (for example "Fixing …" to "Fix …") and type corrections stay out of scope. Those need judgment and belong to the review and fix workflows.Behavior changes for every repo that sets
strip_title_prefix: true, since the option now also capitalizes. I kept it under the existing flag rather than adding a new one. Say so if you would rather have a separate opt-in.I added unit tests for each step and updated
docs/data/release-notes/configure-ref.md.Elastic.Documentation.Configuration.Tests(849) andElastic.Changelog.Tests(1377) pass locally.Fixes elastic/docs-eng-team#1036
🤖 Generated with Claude Code