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

Fix rendered changelog with new version of towncrier #1598

Merged
merged 4 commits into from
Jul 18, 2023

Conversation

zecakeh
Copy link
Contributor

@zecakeh zecakeh commented Jul 12, 2023

The version of towncrier is not pinned in CI so lately the rendering of the changelog is broken in the unstable version (note the changelog categories that are now numbered titles):

image

This is due to twisted/towncrier#483 that is included in towncrier 23.6.0.

The first commit fixes that by replacing the default template by a custom one. It also allows to put formatting in the template only rather than in the config file.

The second commit allows to simplify the generate-changelog.sh script by using the built-in sections feature of towncrier, instead of generating the changelog for each section separately.

This is the result, which should be the same as before:
image

We could almost get rid of the header.md file except we cannot format the release date.

Preview: https://pr1598--matrix-spec-previews.netlify.app

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Instead of generating the changelog for each section

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
@zecakeh zecakeh requested a review from a team as a code owner July 12, 2023 13:54
@@ -6,4 +6,4 @@ jsonschema >= 4.0.0

PyYAML >= 3.12
requests >= 2.18.4
towncrier == 21.9.0rc1
towncrier == 23.6.0
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that towncrier's version is pinned here but not in CI, should that be the case?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that towncrier's version is pinned here but not in CI, should that be the case?

Yes, it should probably be pinned in CI too. Or rather, to save us inevitably forgetting to update one or the other, CI should pip install -r requirements.txt rather than installing a random version of towncrier.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
The method to resolve references changed in 4.18 and a regression
was introduced in 4.18.1

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
@turt2live turt2live self-requested a review July 12, 2023 15:43
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fantastic, thank you!

@richvdh richvdh merged commit 639caf0 into matrix-org:main Jul 18, 2023
10 checks passed
@zecakeh zecakeh deleted the fix-changelog branch September 12, 2023 10:10
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.

None yet

2 participants