- Notifications
You must be signed in to change notification settings - Fork261
fix: providecontext.history global in release notes templates#1005
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
codejedi365 merged 2 commits intopython-semantic-release:masterfromcodejedi365:fix/missing-context-in-release-notesAug 20, 2024
Merged
fix: providecontext.history global in release notes templates#1005
codejedi365 merged 2 commits intopython-semantic-release:masterfromcodejedi365:fix/missing-context-in-release-notesAug 20, 2024
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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
…templatesTemporarily return the `context.history` variable to release notes generationas many users are using it in their release documentation. It was never intendedto be provided and will be removed in the future.context was removed in `v9.8.3` during a refactor and condensing of changelogand release notes functionality.Resolves:python-semantic-release#984
Some markdown sequences can be interpreted as ansi escape sequences which dilutedebugging of release note templates by the user. This change ensures the rawcontent is displayed to the console as expected.
maxrake added a commit to phylum-dev/phylum-ci that referenced this pull requestAug 21, 2024
This change is an update to the one made in#454. Since then, the`python-semantic-release` (PSR) dependency has responded to theirbreaking change by re-defining the `context` variable for release notestemplates. However, they also say that the variable was not meant tobe exposed in the first place and that it will be removed again in thenext major version release. Therefore, the pin has been changed to acaret-style one to allow for getting future releases that are at leastv9.8.7 but less than v10.Discussions with the maintainer are ongoing, to request the featuresrelied upon with the current implementation are accounted for in thenext major version release.References:*python-semantic-release/python-semantic-release#1005*python-semantic-release/python-semantic-release#984Additionally, the release notes template was refactored a tiny bit toaccount for new methods of doing the same thing, but with less code. Thechanges were tested locally and found to produce the same output as theprevious template.
maxrake added a commit to phylum-dev/phylum-ci that referenced this pull requestAug 21, 2024
This change is an update to the one made in#454. Since then, the`python-semantic-release` (PSR) dependency has responded to theirbreaking change by re-defining the `context` variable for release notestemplates. However, they also say that the variable was not meant to beexposed in the first place and that it will be removed again in the nextmajor version release. Therefore, the pin has been changed to acaret-style one to allow for getting future releases that are at leastv9.8.7 but less than v10.Discussions with the maintainer are ongoing, to request the featuresrelied upon with the current implementation are accounted for in thenext major version release.References:*python-semantic-release/python-semantic-release#1005*python-semantic-release/python-semantic-release#984Additionally, the release notes template was refactored a tiny bit toaccount for new methods of doing the same thing, but with less code. Thechanges were tested locally and found to produce the same output as theprevious template.
1 task
This was referencedFeb 5, 2025
Closed
Closed
Closed
Sign up for freeto 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.
Uh oh!
There was an error while loading.Please reload this page.
Purpose
context.historyvariable to release notes generationRationale
Temporarily return the
context.historyvariable to release notes generation as many users are using it in their release documentation. It was never intended to be provided and will be removed in the future.Context was removed in
v9.8.3during a refactor and condensing of changelog and release notes functionality. Ends up the context was provided accidentally because of variable re-use rather than explicit definition which is why it broke upon refactor.How did you test?
Performed some manual testing with a custom template upon the PSR repository. See the commands below for replication. The importance is that the release notes was printed to the console using
--noopmode so we are sure that the formatting and use was working.How to Verify
Add the following file to PSR repository:
Execute
semantic-release --noop changelog --post-to-release-tag v9.8.6