Repository navigation
feat(changelog): modify changelog template to support changelog updates - #1045
Merged
codejedi365 merged 54 commits intoOct 7, 2024
Merged
codejedi365 merged 54 commits into
codejedi365 merged 54 commits into
Conversation
codejedi365
force-pushed
the
feat/updating-changelogs
branch
12 times, most recently
from
October 7, 2024 06:17
27aa45e to
bb203ea
Compare
This feature adds a filter that will enable jinja templates to read a file from the repository into memory to then use as output within the template. The primary use for this is to read in a previous changelog file which then the template can give the illusion of insertion as it re-writes the entire file.
Adds a flag that can be passed to the templating environment to allow for triggering an update mode of a changelog versions an initialization mode. The usage is up to the template developer but for PSR it is used to handle changelog generation vs changelog updating.
This adds a string that represents a filename to a previous changelog file which can be read from inside the template context. The primary use is for enabling the updating of a changelog through jinja templating.
… context This adds a customizable string to the jinja templating context which allows users to use the PSR configuration to pass a custom insertion flag into the templating context. This is intended for use with initializing a changelog and then updating it from that point forward.
It would be nice to maintain file streaming for better memory usage but it prevents the ability to read the file contents previously from within the template which is a desire in order to insert into a previous changelog. In this case, the memory usage is likely not a problem for large text files.
Since this project is generally rendering non-html content such as RST or MD, change the default of the jinja autoescape parameter to false instead of true. When it was true, it would automatically convert any `&` ampersands to its htmlentity equivalent `&` which is completely unnecessary and unreadable in non-html documents.
…t to `false` to match code
… toml-compatibility
…g file for target for update
…ag` config definitions
By popular demand, the desire to only prepend new information to the changelog is now possible given the `changelog.mode = update` configuration option. Resolves: python-semantic-release#858, python-semantic-release#722
…m same timestamps
… & always end with newline
…wlines & writes as os-specific
codejedi365
force-pushed
the
feat/updating-changelogs
branch
from
October 7, 2024 06:55
bb203ea to
65aacb2
Compare
codejedi365
force-pushed
the
feat/updating-changelogs
branch
from
October 7, 2024 07:12
65aacb2 to
81aabfb
Compare
…ut_format` option
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Rationale
How did you test?
Very thorough manual and automated testing