Skip to content

Conversation

@lcawl
Copy link
Contributor

@lcawl lcawl commented Jan 14, 2026

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 --input option support

  • Problem: Only the last --input was processed when multiple were provided.
  • Solution:
    • Changed input parameter from [BundleInputParser] List<BundleInput> to string[] in ChangelogCommand.cs
    • Moved parsing logic from BundleInputParserAttribute to manual parsing using BundleInputParser.ParseAll(input)
    • ConsoleAppFramework now accumulates all --input values into the array

2. Delimiter change for bundle input format

  • Problem: ConsoleAppFramework auto-splits string[] parameters by comma, causing conflicts with comma-separated bundle parts.
  • Solution:
    • Changed internal delimiter from comma (,) to pipe (|) in BundleInputParser.cs
    • Format: "bundle-file-path|changelog-file-path|repo" (parts separated by |)
    • Multiple bundles still separated by commas: "bundle1|dir1|repo1,bundle2|dir2|repo2"

3. Per-entry PR URL resolution

  • Problem: PR URLs were resolved using the first bundle's repository instead of each entry's repository.
  • Solution:
    • Created entryToRepo dictionary mapping each ChangelogData entry to its repository
    • Updated rendering methods (RenderIndexMarkdown, RenderBreakingChangesMarkdown, RenderDeprecationsMarkdown, RenderKnownIssuesMarkdown, RenderEntriesByArea) to accept and use entryToRepo
    • Each PR/issue link now uses the correct repository context

4. Per-bundle link visibility control

  • Problem: --hide-private-links was global, but bundles can come from different repositories (some private, some public).
  • Solution:
    • Removed global --hide-private-links command-line option
    • Added HideLinks property to BundleInput class
    • Extended bundle input format to include link visibility: "bundle-file-path|changelog-file-path|repo|link-visibility"
    • link-visibility accepts hide-links or keep-links (default)
    • Created entryToHideLinks dictionary to track per-entry link visibility
    • Updated rendering methods to use per-entry link visibility settings

Files Modified

Core Implementation

  • src/services/Elastic.Documentation.Services/Changelog/BundleInput.cs - Added HideLinks property
  • src/tooling/docs-builder/Arguments/BundleInputParser.cs - Updated to parse 4-part format with link visibility
  • src/tooling/docs-builder/Commands/ChangelogCommand.cs - Removed --hide-private-links, updated --input parsing
  • src/services/Elastic.Documentation.Services/Changelog/ChangelogRenderInput.cs - Removed HidePrivateLinks property
  • src/services/Elastic.Documentation.Services/ChangelogService.cs - Updated rendering logic for per-entry repo and link visibility

Documentation

  • docs/contribute/changelog.md - Updated --input format documentation, removed --hide-private-links references
  • docs/cli/release/changelog-render.md - Updated option descriptions and examples

Usage Example

docs-builder changelog render \
  --input "/path/to/elasticsearch-serverless/bundle.yaml|/path/to/changelogs|elasticsearch-serverless|hide-links,/path/to/elasticsearch/bundle.yaml|/path/to/changelogs|elasticsearch|keep-links,/path/to/kibana/bundle.yaml|/path/to/changelogs|kibana|keep-links" \
  --output /path/to/output \
  --title "2025-01-13"

Testing

  • All unit tests pass (987 tests)
  • Build succeeds with no errors
  • Binaries published successfully

Breaking Changes

  • The --hide-private-links global option has been removed. Use hide-links in the --input format instead.
  • Bundle input format changed from comma-delimited to pipe-delimited: bundle|dir|repobundle|dir|repo|link-visibility

Generative AI disclosure

  1. Did you use a generative AI (GenAI) tool to assist in creating this contribution?
  • Yes
  • No
  1. If you answered "Yes" to the previous question, please specify the tool(s) and model(s) used (e.g., Google Gemini, OpenAI ChatGPT-4, etc.).

Tool(s) and model(s) used: claude-4.5-opus-high

@lcawl lcawl marked this pull request as ready for review January 14, 2026 03:40
@lcawl lcawl requested review from a team as code owners January 14, 2026 03:40
@lcawl lcawl requested a review from Mpdreamz January 14, 2026 03:40
@lcawl lcawl marked this pull request as draft January 14, 2026 03:48
@lcawl lcawl marked this pull request as ready for review January 14, 2026 05:20
@lcawl lcawl marked this pull request as draft January 14, 2026 06:15
Base automatically changed from changelog-manifest-output to changelog-manifest January 14, 2026 06:15
@cotti cotti merged commit ab77b5b into changelog-manifest Jan 14, 2026
24 of 25 checks passed
@cotti cotti deleted the changelog-manifest-output-fix branch January 14, 2026 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants