Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: improve changelog to be automatically generated by towncrier #921

Merged
merged 2 commits into from Apr 20, 2023

Conversation

umarcor
Copy link
Member

@umarcor umarcor commented Mar 11, 2023

This is a subset of #885, introducing minimal modifications to start using towncrier.

Instead of generating all of docs/release_notes.rst, a skeleton is checked in git. The skeleton includes two files:

  • news.inc: generated by towncrier.
  • release_notes.inc: generated by the existing logic in create_release_notes.py.

towncrier is executed in create_release_notes. Hence, in the same function all the news fragments are combined into news.inc and all the release notes are combined into release_notes.inc. This works even if no news fragments exist (right after a release) because towncrier will produce a sentence telling that no relevant news exist yet.

When a release needs to be done, a maintainer renames the news.inc to release_notes/X.Y.Z.rst and removes the news fragments before executing release.py.

It is to be noted that towncrier tries to add the generated file to git. It seems not possible to prevent it through the configuration nor the CLI. The only alternative seems to be --draft, which prints to stdout instead of writing to the file. That's why this PR uses a fixed file name for towncrier and it is added to .gitignore. The output of towncrier is always temporary (e.g. generated in CI) until a maintainer renames the file to be treated as release notes.

/cc @GlenNicholls

@umarcor umarcor force-pushed the umarcor/towncrier branch 2 times, most recently from 2063996 to 7e39157 Compare March 11, 2023 06:04
@umarcor
Copy link
Member Author

umarcor commented Mar 11, 2023

FTR twisted/towncrier#487

GlenNicholls and others added 2 commits April 20, 2023 01:15
@eine eine merged commit 358979f into VUnit:master Apr 20, 2023
11 of 13 checks passed
@umarcor umarcor deleted the umarcor/towncrier branch April 20, 2023 00:31
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.

None yet

3 participants