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

Allow extract_release_notes_for_version to return the extracted release notes without saving to a file #623

Merged
merged 2 commits into from
Dec 11, 2024

Conversation

AliSoftware
Copy link
Contributor

@AliSoftware AliSoftware commented Dec 11, 2024

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 the CHANGELOG.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 of code_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 the release_notes.txt file and re-commit the changes again at those stages, so calling the action without a extracted_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 of release-toolkit that contained this change and calling extract_release_notes_for_version without an extracted_notes_file_path: parameter and UI.message-printing the returned value.

Checklist before requesting a review

  • Run bundle exec rubocop to test for code style violations and recommendations
  • Add Unit Tests (aka specs/*_spec.rb) if applicable
  • Run bundle exec rspec to run the whole test suite and ensure all your tests pass
  • Make sure you added an entry in the CHANGELOG.md file to describe your changes under the appropriate existing ### subsection of the existing ## Trunk section.
  • If applicable, add an entry in the 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.

@AliSoftware AliSoftware requested a review from a team December 11, 2024 16:32
@AliSoftware AliSoftware self-assigned this Dec 11, 2024
@AliSoftware AliSoftware added the enhancement New feature or request label Dec 11, 2024
@AliSoftware AliSoftware marked this pull request as ready for review December 11, 2024 16:33
Copy link
Contributor

@iangmaia iangmaia left a comment

Choose a reason for hiding this comment

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

👍

@AliSoftware AliSoftware merged commit 36c878d into trunk Dec 11, 2024
13 of 14 checks passed
@AliSoftware AliSoftware deleted the extract_release_notes_result branch December 11, 2024 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants