Skip to content

Add release-dates option to changelog directive#3559

Merged
lcawl merged 2 commits into
mainfrom
changelog-directive-dates
Jun 25, 2026
Merged

Add release-dates option to changelog directive#3559
lcawl merged 2 commits into
mainfrom
changelog-directive-dates

Conversation

@lcawl

@lcawl lcawl commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

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:

Subsections = PropBool("subsections");       // omitted → false
DropdownsEnabled = PropBool("dropdowns");    // omitted → false
ReleaseDatesEnabled = PropBool("release-dates");  // omitted → false
Directive usage Behaviour
(omitted) Do not render _Released:_
:release-dates: or :release-dates: true Render _Released:_ when bundle has release-date

Breaking change: pages that currently show release dates must add :release-dates:.
For example: elastic/elastic-otel-java#1149

Code

  • ChangelogBlock.csReleaseDatesEnabled via PropBool("release-dates") (default false, same as :subsections: / :dropdowns:)
  • ChangelogInlineRenderer.cs — passes bundle.Data?.ReleaseDate to the header only when ReleaseDatesEnabled is true

Tests

Docs

  • 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

  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.5-fast

@lcawl lcawl temporarily deployed to integration-tests June 23, 2026 22:13 — with GitHub Actions Inactive
@lcawl lcawl marked this pull request as ready for review June 23, 2026 22:18
@lcawl lcawl requested review from a team as code owners June 23, 2026 22:18
@lcawl lcawl requested a review from cotti June 23, 2026 22:18
@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@cotti, we couldn't start this review because you've reached your PR review rate limit.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 7253ce95-d126-4f6c-8132-e72c8a6bdf5c

📥 Commits

Reviewing files that changed from the base of the PR and between 10a14b5 and 12244b0.

📒 Files selected for processing (6)
  • docs/syntax/changelog.md
  • src/Elastic.Markdown/Myst/Directives/Changelog/ChangelogBlock.cs
  • src/Elastic.Markdown/Myst/Directives/Changelog/ChangelogInlineRenderer.cs
  • src/Elastic.Markdown/Myst/Directives/Changelog/ChangelogRenderOptions.cs
  • tests/Elastic.Markdown.Tests/Directives/ChangelogBasicTests.cs
  • tests/Elastic.Markdown.Tests/Directives/ChangelogReleaseDatesOptionTests.cs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch changelog-directive-dates
  • 🛠️ Update Documentation

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.

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>
@cotti cotti temporarily deployed to integration-tests June 25, 2026 14:00 — with GitHub Actions Inactive
@cotti

cotti commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

I've tweaked a couple of calls that had parameter creep. Otherwise, LGTM!

@lcawl lcawl merged commit f6d4f8d into main Jun 25, 2026
25 checks passed
@lcawl lcawl deleted the changelog-directive-dates branch June 25, 2026 18:58
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