Skip to content

👷 ci(release): docstrfmt the changelog before committing it - #551

Merged
gaborbernat merged 2 commits into
tox-dev:mainfrom
gaborbernat:fix-release-changelog-format
Sep 18, 2026
Merged

gaborbernat merged 2 commits into
tox-dev:mainfrom
gaborbernat:fix-release-changelog-format

Conversation

@gaborbernat

@gaborbernat gaborbernat commented Sep 18, 2026 •

Copy link
Copy Markdown
Member

Each release commit left docs/changelog.rst in a shape that docstrfmt -l 120 rewrites. Towncrier draws the header overline one character short and breaks lines at other columns. Nothing ran docstrfmt before that commit landed on main, so pre-commit.ci pushed the reformat into whichever PR it touched next. #549 and #550 both carry it. 🧹

prepare-release.yaml runs the docstrfmt pre-commit hook on the generated changelog between towncrier build and the release commit, so the file lands in its final format. pre-commit exits non-zero when a hook rewrites a file. The step ignores that exit code with || true.

The first release through this workflow, 4.11.10, needed no follow-up reformat. 👷

towncrier's header overline and wrapping don't match docstrfmt, so
every release commit left docs/changelog.rst in a state the next PR's
pre-commit.ci run would reformat, carrying an unrelated diff into
whichever PR merged first (e.g. tox-dev#549, tox-dev#550). Run the docstrfmt hook on
the generated changelog before committing the release.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@gaborbernat
gaborbernat requested a review from ofek as a code owner September 18, 2026 01:19
@gaborbernat gaborbernat added github_actions Pull requests that update GitHub Actions code skip news No news fragment needed labels Sep 18, 2026
@gaborbernat gaborbernat changed the title ci: docstrfmt the changelog in prepare-release 👷 ci(release): docstrfmt the changelog before committing it Sep 18, 2026
@gaborbernat
gaborbernat merged commit 5118d32 into tox-dev:main Sep 18, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code skip news No news fragment needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant