Skip to content

Conversation

@lcawl
Copy link
Contributor

@lcawl lcawl commented Dec 31, 2025

Per tests in https://github.com/elastic/cloud/pull/150210 the docs-builder changelog render command was including links to private repo pull requests and issues in the output, which I had to remove manually.

This PR updates #2341 to include a new command option to comment out those internal links. IMO it's better to comment them out rather than remove them, since I've found it useful to have that info in the past during internal reviews.

Summary

Added a --hide-private-links option to the docs-builder changelog render command. When enabled, PR and issue links are commented out in the markdown output.

Changes made

  • ChangelogRenderInput.cs: Added HidePrivateLinks property to store the option value.
  • ChangelogCommand.cs: Added hidePrivateLinks parameter (defaults to false) to the Render command with XML documentation.
  • ChangelogService.cs:
    • Updated RenderChangelogs to pass hidePrivateLinks to all rendering methods
    • Updated RenderIndexMarkdown, RenderBreakingChangesMarkdown, RenderDeprecationsMarkdown, and RenderEntriesByArea to accept and use the hidePrivateLinks parameter
    • Modified FormatPrLink and FormatIssueLink to accept hidePrivateLinks and wrap links in comments when enabled

Usage

docs-builder changelog render \  --input "./changelog-bundle.yaml,./changelogs,elasticsearch" \  --hide-private-links \  --output ./release-notes

When --hide-private-links is enabled, PR and issue links are commented out using % followed by a space, per the Docs-builder comments documentation.

* Feature title.
  % [#123](https://github.com/elastic/repo/pull/123)
  % [#456](https://github.com/elastic/repo/issues/456)
  
  Description here.

This hides the links from the rendered output while preserving them in the source markdown for future use.

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: composer-1 agent

@lcawl lcawl marked this pull request as ready for review December 31, 2025 21:17
@lcawl lcawl requested a review from a team as a code owner December 31, 2025 21:17
@lcawl lcawl requested a review from Mpdreamz December 31, 2025 21:17
@lcawl lcawl requested a review from a team as a code owner December 31, 2025 21:21
@lcawl lcawl merged commit f4b7250 into changelog-manifest Dec 31, 2025
24 checks passed
@lcawl lcawl deleted the render-private-links branch December 31, 2025 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants