Skip to content

Add changelog render --no-descriptions#3263

Merged
cotti merged 13 commits into
mainfrom
changelog-render-no-descriptions
May 14, 2026
Merged

Add changelog render --no-descriptions#3263
cotti merged 13 commits into
mainfrom
changelog-render-no-descriptions

Conversation

@lcawl

@lcawl lcawl commented May 7, 2026

Copy link
Copy Markdown
Contributor

This PR enhances the "changelog render" command with a --no-descriptions option similar to what was accomplished in changelog directives via #3224
In this case, however, we've omitted the auto behavior to keep it simple.

NOTE: This PR also incorporates #3272, since I figured it was dependent on this one.

Screenshots

Before

In #3262, asciidoc output:

  • Descriptions in breaking changes and deprecations:
    image

  • Descriptions in fixes and enhancements:
    image

After

Asciidoc output:

  • Descriptions omitted from breaking changes and descriptions:
    image

  • Descriptions omitted from fixes and enhancements:
    image

AI summary

The implementation works with both --file-type markdown and --file-type asciidoc, hiding entry descriptions while preserving all other content (titles, links, Impact/Action sections, bundle descriptions).

1. CLI Parameter & Arguments

  • Added bool noDescriptions = false parameter to ChangelogCommand.Render
  • Added HideDescriptions property to RenderChangelogsArguments
  • Updated parameter documentation

2. Render Context

  • Added HideDescriptions property to ChangelogRenderContext
  • Updated BuildRenderContext to pass through the flag

3. All Renderers Updated

Markdown Renderers (--file-type markdown):

  • IndexMarkdownRenderer - gates description in bulleted lists
  • BreakingChangesMarkdownRenderer - gates description in both dropdown and flattened modes
  • DeprecationsMarkdownRenderer - gates description in both modes
  • KnownIssuesMarkdownRenderer - gates description in both modes
  • HighlightsMarkdownRenderer - gates description in both modes

AsciiDoc Renderers (--file-type asciidoc):

  • AsciidocRendererBase.RenderEntryDescription() - updated to return early when context.HideDescriptions is true
  • This automatically affects all concrete AsciiDoc renderers

4. Comprehensive Tests

  • ✅ Created tests/Elastic.Changelog.Tests/Changelogs/Render/DescriptionVisibilityTests.cs
  • Tests cover both markdown and asciidoc formats
  • Tests verify descriptions are hidden while preserving titles, links, Impact/Action
  • Tests cover both dropdown and flattened modes
  • Tests verify bundle descriptions remain visible

5. Documentation

  • ✅ Updated docs/cli/changelog/render.md with --no-descriptions flag documentation

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-2, claude-4-sonnet-thinking

@lcawl lcawl mentioned this pull request May 7, 2026
2 tasks
Base automatically changed from changelog-render-asciidoc to changelog-render-dropdowns May 7, 2026 15:27
@lcawl lcawl force-pushed the changelog-render-no-descriptions branch 2 times, most recently from 159ef98 to f5fbfc9 Compare May 7, 2026 17:27
@lcawl lcawl marked this pull request as ready for review May 7, 2026 17:27
@lcawl lcawl requested review from a team as code owners May 7, 2026 17:27
@lcawl lcawl requested a review from Mpdreamz May 7, 2026 17:28
@lcawl lcawl force-pushed the changelog-render-no-descriptions branch from fdea239 to 0845721 Compare May 12, 2026 16:55
@lcawl lcawl requested a review from a team as a code owner May 12, 2026 16:55
@lcawl lcawl marked this pull request as draft May 12, 2026 16:57
@lcawl lcawl force-pushed the changelog-render-no-descriptions branch from 0845721 to e4b6e4e Compare May 12, 2026 16:59
lcawl and others added 6 commits May 12, 2026 10:06
* Improve changelog render asciidoc output

* Remove definition lists in favour of subsections
…AsciidocRenderer.cs

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@lcawl lcawl force-pushed the changelog-render-dropdowns branch from b8d31e3 to 0691b11 Compare May 12, 2026 17:17
@lcawl lcawl force-pushed the changelog-render-no-descriptions branch from e4b6e4e to 14f2d26 Compare May 12, 2026 17:45
@lcawl lcawl marked this pull request as ready for review May 12, 2026 17:46
Base automatically changed from changelog-render-dropdowns to main May 14, 2026 14:56
@coderabbitai

coderabbitai Bot commented May 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Rate limit exceeded

@cotti has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 36 minutes and 59 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: cbb22e9d-07ad-45e9-af59-9e384f9b9304

📥 Commits

Reviewing files that changed from the base of the PR and between 09960fa and fe615b8.

📒 Files selected for processing (2)
  • docs/cli/changelog/cmd-render.md
  • tests/Elastic.Changelog.Tests/Changelogs/Render/GfmRenderTests.cs
📝 Walkthrough

Walkthrough

This PR adds two complementary features to the changelog rendering system. First, it introduces a --no-descriptions flag that suppresses changelog entry descriptions across all output formats while preserving titles, PR/issue links, and special sections like Impact/Action for breaking changes. Second, it adds a new GitHub Flavored Markdown renderer that generates a single changelog.md file instead of multiple format-specific files, with configurable section visibility and entry grouping by component area.

Possibly related PRs

  • elastic/docs-builder#3244: Prior PR modifying the same Markdown/Asciidoc renderer branches (dropdown vs flattened modes) in BreakingChangesMarkdownRenderer, DeprecationsMarkdownRenderer, and related classes; this PR adds orthogonal HideDescriptions logic to those same render paths.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 15.38% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary feature being added: a new --no-descriptions option for the changelog render command.
Description check ✅ Passed The description is directly related to the changeset, explaining the new --no-descriptions flag, implementation details across renderers, tests, and documentation updates.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch changelog-render-no-descriptions

Warning

Review ran into problems

🔥 Problems

Stopped waiting for pipeline failures after 30000ms. One of your pipelines takes longer than our 30000ms fetch window to run, so review may not consider pipeline-failure results for inline comments if any failures occurred after the fetch window. Increase the timeout if you want to wait longer or run a @coderabbit review after the pipeline has finished.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/cli/changelog/cmd-render.md`:
- Line 90: The shell example has a broken line continuation: the example line
ending with "--output ./release-notes \" includes a trailing backslash that
breaks copy/paste; remove the trailing backslash so the flag is on its own line
(or combine it with the preceding line) in the cmd-render example to ensure the
example executes correctly.
- Around line 55-75: Add documentation for the new CLI flag --no-descriptions
under the changelog render command's options: describe the flag (e.g.,
"--no-descriptions  Omit entry descriptions in output"), its effect on GFM and
other file-type outputs (removes per-entry description text while keeping
headings and entry titles), its default behavior (descriptions included unless
flag is set), and an example usage line for "changelog render --file-type gfm
--no-descriptions". Place this entry alongside the existing options for the
"changelog render" command so users can discover the flag when viewing the
command docs.

In `@src/services/Elastic.Changelog/Rendering/ChangelogRenderer.cs`:
- Line 62: The await call to gfmRenderer.RenderAsync(context, ctx) in
ChangelogRenderer.RenderAsync is in library code and must use
ConfigureAwait(false); change the await to: await
gfmRenderer.RenderAsync(context, ctx).ConfigureAwait(false). Also review other
awaits inside ChangelogRenderer (and any helper methods it calls) to ensure
library-level awaits use ConfigureAwait(false) consistently.

In `@src/services/Elastic.Changelog/Rendering/Markdown/ChangelogGfmRenderer.cs`:
- Around line 172-292: RenderEntriesByArea is too complex (many conditional
branches); extract the link-rendering block (the code handling
entry.Prs/entry.Issues, building linkParts or writing commented links) into one
or two helper methods—e.g., CreateLinkParts(ChangelogEntry entry, string
entryRepo, bool entryHideLinks, string entryOwner) that returns List<string>,
and RenderCommentedLinks(StringBuilder sb, ChangelogEntry entry, string
entryRepo, bool entryHideLinks, string entryOwner, bool shouldHide) that emits
the commented-version lines—then replace the inline logic in RenderEntriesByArea
with calls to these helpers and keep existing behavior around spacing,
hasCommentedLinks, and how descriptions are indented; use existing helpers like
ChangelogTextUtilities.FormatPrLink/FormatIssueLink and
ChangelogRenderUtilities.GetEntryContext to locate data.
- Around line 24-170: The RenderAsync method in ChangelogGfmRenderer is too
complex (many conditional branches); extract per-section rendering into small
helpers to reduce branching: create helper methods such as
RenderFeaturesAndEnhancementsSection(ChangelogRenderContext, StringBuilder),
RenderBreakingChangesSection(...), RenderBugFixesAndSecuritySection(...), and a
generic RenderSection(string title, IReadOnlyCollection<ChangelogEntry> entries,
ChangelogRenderContext, StringBuilder) that encapsulates the Count checks,
AllEntriesHidden(entryCollection) calls, appending the section header and
calling RenderEntriesByArea; replace the inline blocks in RenderAsync with calls
to these helpers and keep WriteOutputFileAsync unchanged so method complexity
drops below the 5–7 branch guideline.
- Line 169: In ChangelogGfmRenderer's async render flow (e.g., RenderAsync)
replace the plain await on WriteOutputFileAsync(context.OutputDir,
context.TitleSlug, sb.ToString(), ctx) with an await that calls
ConfigureAwait(false) to avoid capturing the synchronization context; i.e.,
await WriteOutputFileAsync(...).ConfigureAwait(false). Update any similar awaits
in this renderer that call library async helpers (like WriteOutputFileAsync) to
also use ConfigureAwait(false).

In `@tests/Elastic.Changelog.Tests/Changelogs/Render/GfmRenderTests.cs`:
- Around line 391-393: The second-pass assertions need to verify that no errors
occurred and that all description lines are present: after the second call to
the renderer (the second Render invocation that produces content), assert
Collector.Errors is empty (or HasNoErrors) and extend the content assertions to
check all expected description lines (e.g., both "Feature with description" and
"This is a detailed description of the feature." plus any additional multiline
description lines used in the test) instead of only one line; update the
assertions around the second render to reference Collector.Errors and the
content variable produced by that second Render call (the same content
variable/name used in the test) so multiline regressions will be caught.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 628ee55e-9423-4e8b-9b1c-2bd49d71b936

📥 Commits

Reviewing files that changed from the base of the PR and between 4dffbfe and 09960fa.

📒 Files selected for processing (15)
  • docs/cli-schema.json
  • docs/cli/changelog/cmd-render.md
  • src/services/Elastic.Changelog/Rendering/Asciidoc/AsciidocRendererBase.cs
  • src/services/Elastic.Changelog/Rendering/ChangelogRenderContext.cs
  • src/services/Elastic.Changelog/Rendering/ChangelogRenderer.cs
  • src/services/Elastic.Changelog/Rendering/ChangelogRenderingService.cs
  • src/services/Elastic.Changelog/Rendering/Markdown/BreakingChangesMarkdownRenderer.cs
  • src/services/Elastic.Changelog/Rendering/Markdown/ChangelogGfmRenderer.cs
  • src/services/Elastic.Changelog/Rendering/Markdown/DeprecationsMarkdownRenderer.cs
  • src/services/Elastic.Changelog/Rendering/Markdown/HighlightsMarkdownRenderer.cs
  • src/services/Elastic.Changelog/Rendering/Markdown/IndexMarkdownRenderer.cs
  • src/services/Elastic.Changelog/Rendering/Markdown/KnownIssuesMarkdownRenderer.cs
  • src/tooling/docs-builder/Commands/ChangelogCommand.cs
  • tests/Elastic.Changelog.Tests/Changelogs/Render/DescriptionVisibilityTests.cs
  • tests/Elastic.Changelog.Tests/Changelogs/Render/GfmRenderTests.cs

Comment thread docs/cli/changelog/cmd-render.md
Comment thread docs/cli/changelog/cmd-render.md Outdated
Comment thread src/services/Elastic.Changelog/Rendering/ChangelogRenderer.cs
Comment thread tests/Elastic.Changelog.Tests/Changelogs/Render/GfmRenderTests.cs
cotti
cotti previously approved these changes May 14, 2026
@cotti cotti dismissed their stale review May 14, 2026 15:35

Refactoring prior to merge

- Document --no-descriptions in cmd-render.md options and add an
  example entry; the flag existed in the XML doc and cli-schema.json
  but was missing from the user-facing page.
- Drop a trailing backslash from the first shell example so the
  block copy/pastes correctly.
- Strengthen the GFM hide-descriptions test: assert Collector.Errors
  after the second render and check both lines of the multi-line
  description in each pass so multi-line regressions are caught.

Deferred CodeRabbit suggestions (with reason):
- ConfigureAwait(false) on the new GFM awaits: not used anywhere
  else in src/services/Elastic.Changelog/ (zero usages); applying
  it only to the new code would create more drift than it removes.
- Extract helpers from ChangelogGfmRenderer.RenderAsync /
  RenderEntriesByArea to lower branch count: the sibling per-type
  renderers (BreakingChangesMarkdownRenderer, etc.) follow the same
  pattern; refactoring just the new file would be inconsistent and
  is out of scope for this PR.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cotti cotti enabled auto-merge (squash) May 14, 2026 15:47
@cotti cotti merged commit d18edd5 into main May 14, 2026
24 checks passed
@cotti cotti deleted the changelog-render-no-descriptions branch May 14, 2026 15:51
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