Fix changelog add --no-extract-issues and --no-extract-release-notes#2778
Merged
Fix changelog add --no-extract-issues and --no-extract-release-notes#2778
Conversation
🔍 Preview links for changed docs |
reakaleek
approved these changes
Feb 24, 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.
Relates to #2775
Summary
The
changelog add commanddocuments thatextract.release_notesandextract.issuesinchangelog.ymlcan be set as defaults, but the CLI's own defaults (always true) are used instead.ChangelogCreationService.ApplyConfigDefaultscurrently returns the input unchanged.The comment in
ChangelogCreationService.cssays "Apply config defaults to input (for
extract_release_notes,extract_issues)" but the implementation does nothing.With this fix, the behaviour is as follows:
extract.release_notes/extract.issuesfrom config (default true)--no-extract-release-notes/--no-extract-issues→ CLI wins and disables extractionCode changes
CreateChangelogArguments(ChangelogCreationService.cs)ExtractReleaseNotesandExtractIssueschanged frombooltobool?nullmeans “use config default”;true/falsemeans an explicit CLI valueChangelogCommand.Create(ChangelogCommand.cs)nullinstead oftruewhen the user doesn’t pass--no-extract-release-notesor--no-extract-issuesfalsewhen the user passes those flagsApplyConfigDefaults(ChangelogCreationService.cs)ExtractReleaseNotes = input.ExtractReleaseNotes ?? config.Extract.ReleaseNotesExtractIssues = input.ExtractIssues ?? config.Extract.IssuesConsumers (
PrInfoProcessor.cs,IssueInfoProcessor.cs)input.ExtractReleaseNotes ?? falseandinput.ExtractIssues ?? falsebecause the properties are nowbool?Documentation
docs/contribute/changelog.mdalready describes the intended behavior... The docs assume both the CLI and config work; the fix makes the implementation match that.docs/cli/release/changelog-add.mddoes not say where the default comes from when the flags are omitted. I've added a note that when the flag is not provided, the default comes fromextract.release_notes/extract.issuesinchangelog.yml.Tests
A new test
CreateChangelog_WhenExtractNotSpecifiedByCli_UsesConfigExtractReleaseNotesverifies that when CLI does not pass the flag,extract.release_notes: falsein config disables extraction (PR title is used instead of extracted release notes)Existing tests that pass
ExtractReleaseNotes = trueorExtractIssues = truestill pass, since those values remain valid forbool?.Tests that don’t set these properties (default
null) now get their values from config. When tests useCreateConfigDirectory()with configs that omitextract, the loader falls back toextract.release_notes ?? trueandextract.issues ?? true, so the effective behavior stays “extraction on” as before. The full changelog suite (231 tests) continues to pass, so no existing test behavior is regressed.Steps for testing
extract.release_notesandextract.issueschangelog configuration settings. Try the subsequent tests with them set to bothtrueandfalseto verify they're heeded.docs-builder changelog add \ --products "kibana 9.3.0" \ --config ./docs/changelog.yml \ --prs https://github.com/elastic/kibana/pull/243792--no-extract-release-notesand--no-extract-issuesto verify that they override the changelog config settings.Generative AI disclosure
Tool(s) and model(s) used: composer-1.5