Skip to content

Show pending newsfragments in documentation previews - #173

Merged
RazerM merged 1 commit into
mainfrom
feature/changelog-preview
Aug 23, 2026
Merged

Show pending newsfragments in documentation previews#173
RazerM merged 1 commit into
mainfrom
feature/changelog-preview

Conversation

@RazerM

@RazerM RazerM commented Aug 23, 2026

Copy link
Copy Markdown
Member

Adds sphinxcontrib-towncrier so the changelog in documentation previews starts with an Unreleased section (the Keep a Changelog convention) rendering the newsfragments that have not been released yet. The Read the Docs build of this PR shows the result for the fragments currently on main.

As attrs does, the release title is now rendered by a towncrier template (newsfragments/template.rst.jinja, the default RST template plus a branch on the version) rather than title_format, so the draft heading is a plain Unreleased while release headings are unchanged — verified by diffing a full towncrier build --draft before and after.

@codecov

codecov Bot commented Aug 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.30%. Comparing base (b12acf5) to head (b09904d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #173   +/-   ##
=======================================
  Coverage   98.30%   98.30%           
=======================================
  Files           7        7           
  Lines        1298     1298           
  Branches      135      135           
=======================================
  Hits         1276     1276           
  Misses         12       12           
  Partials       10       10           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@RazerM
RazerM force-pushed the feature/changelog-preview branch from 90d781c to f36d8b5 Compare August 23, 2026 14:28
sphinxcontrib-towncrier renders the newsfragments that have not been
released yet at the top of the changelog, so that documentation
previews built from pull requests include their entries.

The title is now rendered by a custom towncrier template instead of
title_format, so that the draft gets a plain "Unreleased" heading
while releases keep their linked heading, unchanged.
@RazerM
RazerM force-pushed the feature/changelog-preview branch from f36d8b5 to b09904d Compare August 23, 2026 14:32
@RazerM
RazerM merged commit 8258f51 into main Aug 23, 2026
11 checks passed
@RazerM
RazerM deleted the feature/changelog-preview branch August 23, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant