feat(get_prs_between_tags): add opt-in fail_on_error - #772
Merged
Conversation
The action rescues every StandardError from `generate_release_notes` and returns the message as the changelog, so a transient API failure yields a GitHub Release whose notes read "❌ Error computing the list of PRs…". That is the right default for callers that create the release first and would rather ship degraded notes than fail the lane. It is the wrong one for callers that push the tag and then create the release from the computed notes: there the failure needs to stop the lane while a re-run is still cheap. Defaults to false, so existing callers are unaffected. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
AliSoftware
approved these changes
Aug 19, 2026
AliSoftware
left a comment
Contributor
There was a problem hiding this comment.
Looking good 👍 ![]()
cc @iangmaia FYI as you're currently also working on a PR in release-toolkit to add a fail_on_error on a different action (translations-related actions), might make sense to make sure the semantic and description of those params are consistent between the two PRs, even if they are on completely different actions, just for consistency with our wording being aligned on the description of such ConfigItem across actions and such
AliSoftware
reviewed
Aug 19, 2026
Avoid unnecessary explanation in the CHANGELOG. Co-authored-by: Olivier Halligon <olivier.halligon@automattic.com>
Member
Author
|
@AliSoftware thank you for the review and suggestion. 🙇🏻♂️ |
Contributor
Gave it a go at ef119031 |
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.
What does it do?
Adds an opt-in
fail_on_error:parameter toget_prs_between_tags, defaulting tofalseso existing callers are unaffected.The action rescues every
StandardErrorfromgenerate_release_notesand returns the message as the changelog:That is the right default when the caller creates the GitHub Release first and would rather ship degraded notes than fail the lane — the error stays visible in the release body.
It is the wrong default when the caller pushes the tag and then creates the release from the computed notes. There, a transient API failure publishes a release whose body reads
❌ Error computing the list of PRs since v0.19.0: ..., which reads as a successful release and is typically only caught by someone reading the release page later. Those callers want the lane to stop while a re-run is still cheap.Prompted by GutenbergKit#588, where @AliSoftware suggested adding this upstream so the app can use the action directly instead of reaching past it into
GithubHelper#generate_release_notes.This follows the same opt-in shape as #771, which adds
fail_on_errorto the translation-download actions. No file overlap between the two.Usage
Testing
git_helper_spec.rb:59(git-lfs detection), which reproduces on a cleantrunkin my environment and is unrelated to this change.Checklist before requesting a review
bundle exec rubocopto test for code style violations and recommendations.specs/*_spec.rb) if applicable.bundle exec rspecto run the whole test suite and ensure all your tests pass.CHANGELOG.mdfile to describe your changes under the appropriate existing###subsection of the existing## Trunksection.MIGRATION.mdfile to describe how the changes will affect the migration from the previous major version and what the clients will need to change and consider. Not applicable — the new parameter is optional and defaults to the current behavior.