Add next_version parameter to release notes update actions#706
Add next_version parameter to release notes update actions#706
next_version parameter to release notes update actions#706Conversation
The `android_update_release_notes` and `ios_update_release_notes` actions used a built-in calculator that assumes minor version caps at 9 (WordPress/ Jetpack convention). This caused apps using semantic versioning (e.g. Pocket Casts) to get incorrect version bumps (8.9 → 9.0 instead of 8.10). Add an optional `next_version` parameter so callers can provide the correct next version directly. Deprecate the `new_version` parameter in favor of it. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds support for explicitly supplying the next release version when updating Android/iOS release notes, avoiding the current built-in “minor rolls over at 9” version bump logic that breaks strict semver flows.
Changes:
- Add optional
next_versionparameter (preferred) toandroid_update_release_notesandios_update_release_notes; deprecatenew_version. - Add runtime validation requiring at least one of
next_versionornew_version. - Extend Android/iOS action specs to cover
next_versionbehavior, precedence, and missing-parameter error.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_release_notes.rb |
Accept next_version, deprecate new_version, add “must provide one” validation. |
lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_update_release_notes.rb |
Same as iOS action for Android implementation. |
spec/ios_update_release_notes_spec.rb |
Add tests for next_version direct usage, precedence, and missing params error. |
spec/android_update_release_notes_spec.rb |
Mirror iOS tests for Android action. |
CHANGELOG.md |
Document the added next_version option and semver bump fix in Trunk. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
lib/fastlane/plugin/wpmreleasetoolkit/actions/ios/ios_update_release_notes.rb
Outdated
Show resolved
Hide resolved
lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_update_release_notes.rb
Outdated
Show resolved
Hide resolved
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
| deprecated: 'Use `next_version` instead. This parameter computes the next version using a built-in calculator ' \ | ||
| 'that assumes the minor version rolls over to the next major at 9, which is incorrect for apps using semantic versioning', |
There was a problem hiding this comment.
The fact that the "This parameter computes the next version…" sentence was just after the "Use next_version instead" sentence made me think at first that the "This parameter" was referencing "next_version", not "new_version".
I wonder if we couldn't adjust the wording of this to make it less ambiguous 🤔 We could put the "Use next_version instead" sentence at the very end, which would avoid the confusion… but would make the important bit less visible than the FYI bit, so maybe not the best…
lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_update_release_notes.rb
Show resolved
Hide resolved
lib/fastlane/plugin/wpmreleasetoolkit/actions/android/android_update_release_notes.rb
Show resolved
Hide resolved
| deprecated: 'Use `next_version` instead. This parameter computes the next version using a built-in calculator ' \ | ||
| 'that assumes the minor version rolls over to the next major at 9, which is incorrect for apps using semantic versioning', | ||
| optional: true, | ||
| type: String), | ||
| FastlaneCore::ConfigItem.new(key: :next_version, | ||
| description: 'The next version to use as the section title in the release notes. ' \ | ||
| 'When provided, this value is used directly instead of computing it from `new_version`. ' \ | ||
| 'Use this if your app does not follow the default versioning convention (minor capped at 9)', | ||
| optional: true, |
There was a problem hiding this comment.
Same remarks (wording of the deprecated attribute + use of conflicting_options in both conflicting ConfigItems)
Summary
Fixes: AINFRA-2242
next_versionparameter toandroid_update_release_notesandios_update_release_notesactions, so callers can provide the correct next version directlynew_versionparameter, which uses a built-in calculator that assumes minor version caps at 9 (WordPress/Jetpack convention) — causing incorrect bumps for apps using semantic versioning (e.g. Pocket Casts: 8.9 → 9.0 instead of 8.10)next_versionornew_version(non-empty)Test plan
bundle exec rspec spec/android_update_release_notes_spec.rb spec/ios_update_release_notes_spec.rb— all passbundle exec rubocop— no violationsnew_versioncontinue to work (backward compatible)next_versionget the value used directly as-is🤖 Generated with Claude Code