Fix changelog render with multiple input #2461
Merged
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
This PR fixes an issue with the "docs-builder changelog render" command as it's implemented in #2341
When rendering multiple bundles in a single command, the full set of information was not being rendered successfully.
Changes
1. Multiple
--inputoption support--inputwas processed when multiple were provided.inputparameter from[BundleInputParser] List<BundleInput>tostring[]inChangelogCommand.csBundleInputParserAttributeto manual parsing usingBundleInputParser.ParseAll(input)--inputvalues into the array2. Delimiter change for bundle input format
string[]parameters by comma, causing conflicts with comma-separated bundle parts.,) to pipe (|) inBundleInputParser.cs"bundle-file-path|changelog-file-path|repo"(parts separated by|)"bundle1|dir1|repo1,bundle2|dir2|repo2"3. Per-entry PR URL resolution
entryToRepodictionary mapping eachChangelogDataentry to its repositoryRenderIndexMarkdown,RenderBreakingChangesMarkdown,RenderDeprecationsMarkdown,RenderKnownIssuesMarkdown,RenderEntriesByArea) to accept and useentryToRepo4. Per-bundle link visibility control
--hide-private-linkswas global, but bundles can come from different repositories (some private, some public).--hide-private-linkscommand-line optionHideLinksproperty toBundleInputclass"bundle-file-path|changelog-file-path|repo|link-visibility"link-visibilityacceptshide-linksorkeep-links(default)entryToHideLinksdictionary to track per-entry link visibilityFiles Modified
Core Implementation
src/services/Elastic.Documentation.Services/Changelog/BundleInput.cs- AddedHideLinkspropertysrc/tooling/docs-builder/Arguments/BundleInputParser.cs- Updated to parse 4-part format with link visibilitysrc/tooling/docs-builder/Commands/ChangelogCommand.cs- Removed--hide-private-links, updated--inputparsingsrc/services/Elastic.Documentation.Services/Changelog/ChangelogRenderInput.cs- RemovedHidePrivateLinkspropertysrc/services/Elastic.Documentation.Services/ChangelogService.cs- Updated rendering logic for per-entry repo and link visibilityDocumentation
docs/contribute/changelog.md- Updated--inputformat documentation, removed--hide-private-linksreferencesdocs/cli/release/changelog-render.md- Updated option descriptions and examplesUsage Example
Testing
Breaking Changes
--hide-private-linksglobal option has been removed. Usehide-linksin the--inputformat instead.bundle|dir|repo→bundle|dir|repo|link-visibilityGenerative AI disclosure
Tool(s) and model(s) used: claude-4.5-opus-high