Allow extract_release_notes_for_version
to return the extracted release notes without saving to a file
#623
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.
What does it do?
As it says on the tin.
The old implementation kinda had half-support for the case where we didn't provide a destination file path, but printed the result using
puts
instead of returning it as a value of the action.Why?
This change will be useful in particular for my work on PocketCasts automation, as when automating the submission to TestFlight and creating the GitHub Release for beta builds, the PocketCasts team wants to always use the latest release notes extracted from
CHANGELOG.md
when submitting to external testers in TestFlight or creating the GH Release (since they might have added some new entries to theCHANGELOG.md
as part of landing some bugfixes during the beta phase and want to include those as well).This means we can't really rely on just reading the content of the
release_notes.txt
file that was previously extracted as part ofcode_freeze
, as that file won't include the latest changes at the time we do a new beta. But we don't need to save the re-extracted content into therelease_notes.txt
file and re-commit the changes again at those stages, so calling the action without aextracted_notes_file_path:
parameter and just manipulating the returned string would be better for those use cases.Testing
I've tested this by pointing PocketCasts-iOS's
Gemfile
to my local copy ofrelease-toolkit
that contained this change and callingextract_release_notes_for_version
without anextracted_notes_file_path:
parameter andUI.message
-printing the returned value.Checklist before requesting a review
bundle exec rubocop
to test for code style violations and recommendationsspecs/*_spec.rb
) if applicablebundle exec rspec
to run the whole test suite and ensure all your tests passCHANGELOG.md
file to describe your changes under the appropriate existing###
subsection of the existing## Trunk
section.MIGRATION.md
file to describe how the changes will affect the migration from the previous major version and what the clients will need to change and consider.