fix: update_cucumber script should not fail on manually created releases#396
Merged
acoulton merged 1 commit intoBehat:masterfrom Nov 12, 2025
Merged
fix: update_cucumber script should not fail on manually created releases#396acoulton merged 1 commit intoBehat:masterfrom
acoulton merged 1 commit intoBehat:masterfrom
Conversation
The script was assuming that `target_commitish` in the releases API would generally be the hash of the release tag, other than for an edge case on v29.0.0 which had been patched manually in the code. In fact, `target_commitish` will only be a hash if the tag was created before the release (e.g. by cucumber's automated release actions). If the release is created manually in the github UI with a not-yet-existing tag then `target_commitish` will instead be the branch name it was created from. In that case, the only way to get the hash is to separately look up the tag name in the tags API. This was causing the script to fail due to two recent manual releases on the upstream repo. I have fixed this to now look up tag details if they're missing from the releases API. As part of this, I have refactored to only look up releases that are `>=` the one we are currently pinned to. This means we will only need to look up tags for manual releases until we update past them.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #396 +/- ##
=========================================
Coverage 95.86% 95.86%
Complexity 669 669
=========================================
Files 44 44
Lines 1934 1934
=========================================
Hits 1854 1854
Misses 80 80
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
stof
approved these changes
Nov 12, 2025
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.
The script was assuming that
target_commitishin the releases API would generally be the hash of the release tag, other than for an edge case on v29.0.0 which had been patched manually in the code.In fact,
target_commitishwill only be a hash if the tag was created before the release (e.g. by cucumber's automated release actions). If the release is created manually in the github UI with a not-yet-existing tag thentarget_commitishwill instead be the branch name it was created from. In that case, the only way to get the hash is to separately look up the tag name in the tags API.This was causing the script to fail due to two recent manual releases on the upstream repo.
I have fixed this to now look up tag details if they're missing from the releases API. As part of this, I have refactored to only look up releases that are
>=the one we are currently pinned to. This means we will only need to look up tags for manual releases until we update past them.