Add changelog render --no-descriptions#3263
Conversation
159ef98 to
f5fbfc9
Compare
fdea239 to
0845721
Compare
0845721 to
e4b6e4e
Compare
* 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>
b8d31e3 to
0691b11
Compare
e4b6e4e to
14f2d26
Compare
|
Warning Rate limit exceeded
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 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR adds two complementary features to the changelog rendering system. First, it introduces a Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches✨ Simplify code
Warning Review ran into problems🔥 ProblemsStopped 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 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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (15)
docs/cli-schema.jsondocs/cli/changelog/cmd-render.mdsrc/services/Elastic.Changelog/Rendering/Asciidoc/AsciidocRendererBase.cssrc/services/Elastic.Changelog/Rendering/ChangelogRenderContext.cssrc/services/Elastic.Changelog/Rendering/ChangelogRenderer.cssrc/services/Elastic.Changelog/Rendering/ChangelogRenderingService.cssrc/services/Elastic.Changelog/Rendering/Markdown/BreakingChangesMarkdownRenderer.cssrc/services/Elastic.Changelog/Rendering/Markdown/ChangelogGfmRenderer.cssrc/services/Elastic.Changelog/Rendering/Markdown/DeprecationsMarkdownRenderer.cssrc/services/Elastic.Changelog/Rendering/Markdown/HighlightsMarkdownRenderer.cssrc/services/Elastic.Changelog/Rendering/Markdown/IndexMarkdownRenderer.cssrc/services/Elastic.Changelog/Rendering/Markdown/KnownIssuesMarkdownRenderer.cssrc/tooling/docs-builder/Commands/ChangelogCommand.cstests/Elastic.Changelog.Tests/Changelogs/Render/DescriptionVisibilityTests.cstests/Elastic.Changelog.Tests/Changelogs/Render/GfmRenderTests.cs
- 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>
This PR enhances the "changelog render" command with a
--no-descriptionsoption similar to what was accomplished in changelog directives via #3224In this case, however, we've omitted the
autobehavior 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:

Descriptions in fixes and enhancements:

After
Asciidoc output:
Descriptions omitted from breaking changes and descriptions:

Descriptions omitted from fixes and enhancements:

AI summary
The implementation works with both
--file-type markdownand--file-type asciidoc, hiding entry descriptions while preserving all other content (titles, links, Impact/Action sections, bundle descriptions).1. CLI Parameter & Arguments
bool noDescriptions = falseparameter toChangelogCommand.RenderHideDescriptionsproperty toRenderChangelogsArguments2. Render Context
HideDescriptionsproperty toChangelogRenderContextBuildRenderContextto pass through the flag3. All Renderers Updated
Markdown Renderers (
--file-type markdown):IndexMarkdownRenderer- gates description in bulleted listsBreakingChangesMarkdownRenderer- gates description in both dropdown and flattened modesDeprecationsMarkdownRenderer- gates description in both modesKnownIssuesMarkdownRenderer- gates description in both modesHighlightsMarkdownRenderer- gates description in both modesAsciiDoc Renderers (
--file-type asciidoc):AsciidocRendererBase.RenderEntryDescription()- updated to return early whencontext.HideDescriptionsis true4. Comprehensive Tests
tests/Elastic.Changelog.Tests/Changelogs/Render/DescriptionVisibilityTests.cs5. Documentation
docs/cli/changelog/render.mdwith--no-descriptionsflag documentationGenerative AI disclosure
Tool(s) and model(s) used: composer-2, claude-4-sonnet-thinking