Add release-dates option to changelog directive#3559
Conversation
|
Warning Review limit reached
More reviews will be available in 55 minutes and 38 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
RenderSingleBundle and GenerateMarkdown far exceeded the repo's 4-parameter guideline and passed booleans positionally at their call sites; adding :release-dates: pushed RenderSingleBundle to 10 params. Extract the directive-invariant options (now including ReleaseDatesEnabled) into ChangelogRenderOptions, built once from ChangelogBlock and mirroring the service-side ChangelogRenderContext, and the per-bundle computed values into a private BundleRenderModel. Both methods now take two parameters. Pure refactor: rendering output is unchanged and all changelog tests pass. Co-authored-by: Cursor <cursoragent@cursor.com>
|
I've tweaked a couple of calls that had parameter creep. Otherwise, LGTM! |
Background
@itsalexcm determined in his research for the new release notes site that there's value to having dates associated with all of our releases.
With the current stop-gap method of publishing release notes via changelog directives, release dates are always rendered if they exist (e.g. in EDOT Java release notes.
However, showing release dates for date-based releases (where the date already appears in the title) currently makes little sense.
Therefore, this PR separates the existence of release date info in the bundle from whether/not it's rendered.
Goal
Add opt-in
:release-dates:on{changelog}(aligned with:subsections:/:dropdowns:). Render-time only; no CLI changes.Design
Same pattern as existing boolean options:
_Released:_:release-dates:or:release-dates: true_Released:_when bundle hasrelease-dateBreaking change: pages that currently show release dates must add
:release-dates:.For example: elastic/elastic-otel-java#1149
Code
ChangelogBlock.cs—ReleaseDatesEnabledviaPropBool("release-dates")(defaultfalse, same as:subsections:/:dropdowns:)ChangelogInlineRenderer.cs— passesbundle.Data?.ReleaseDateto the header only whenReleaseDatesEnabledis trueTests
ChangelogBasicTests.cs— existing release-date tests now use:release-dates:ChangelogReleaseDatesOptionTests.cs— new coverage for default-off, enabled, missing bundle date, and description still renderingDocs
docs/syntax/changelog.md— options table, example,:release-dates:section, CDN note, and rendered-output guidance (bundle-time vs render-time)Breaking change: pages that show
_Released:_must add:release-dates:to the directive.Generative AI disclosure
Tool(s) and model(s) used: composer-2.5-fast