Skip to content

Fix release notes version bump using next_version param#5185

Merged
mokagio merged 3 commits intomainfrom
iangmaia/fix-release-notes-version-bump
Mar 31, 2026
Merged

Fix release notes version bump using next_version param#5185
mokagio merged 3 commits intomainfrom
iangmaia/fix-release-notes-version-bump

Conversation

@iangmaia
Copy link
Copy Markdown
Contributor

@iangmaia iangmaia commented Mar 30, 2026

Summary

Fixes: AINFRA-2242

  • Uses the new next_version parameter of android_update_release_notes (from release-toolkit) to pass the computed next version directly via release_version_next
  • Fixes the bug where code freeze bumped release notes from 8.9 to 9.0 instead of 8.10, because the toolkit's built-in calculator assumes minor version caps at 9

Depends on: wordpress-mobile/release-toolkit#706

Test plan

  • Verify release_version_next returns the correct next version (e.g. 8.10 when current is 8.9-rc-1)
  • Run a code freeze and confirm the CHANGELOG gets a section for the correct next version

🤖 Generated with Claude Code

Pass the computed next version directly to `android_update_release_notes`
using the new `next_version` parameter, instead of relying on the toolkit's
built-in calculator which incorrectly caps minor version at 9 (e.g. bumping
8.9 → 9.0 instead of 8.10).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@iangmaia iangmaia self-assigned this Mar 30, 2026
Copilot AI review requested due to automatic review settings March 30, 2026 12:19
@dangermattic
Copy link
Copy Markdown
Collaborator

dangermattic commented Mar 30, 2026

1 Warning
⚠️ PR is not assigned to a milestone.

Generated by 🚫 Danger

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the Fastlane code-freeze automation to use the release-toolkit’s new next_version parameter when updating Android release notes, aiming to avoid incorrect version bumping (e.g., 8.9 -> 9.0 instead of 8.10).

Changes:

  • Switches android_update_release_notes from new_version: to next_version: in the code_freeze lane.

)
android_update_release_notes(
new_version: new_version,
next_version: release_version_next,
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

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

next_version is being set to release_version_next, which re-computes based on the current version.properties at the time this runs (after you've already bumped to new_beta_version). This can yield the wrong value (e.g., 8.11) and it also ignores an explicit version: passed into the lane, despite the earlier comment that it becomes the source of truth. Consider passing the already-computed new_version (or storing the pre-bump next version in a variable and reusing it here) so the release notes bump matches the intended target version.

Suggested change
next_version: release_version_next,
next_version: new_version,

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

new_version is the version being frozen (e.g. "8.9"), and we need the section title to be the version after it ("8.10").

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

# release_version_next reads it and computes the next release (e.g. "8.10").
android_update_release_notes(
new_version: new_version,
next_version: release_version_next,
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

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

android_update_release_notes is now called with next_version:; with the repo currently pinning fastlane-plugin-wpmreleasetoolkit to 13.8.x in Gemfile.lock, this lane will raise an “unknown option”/parameter error until the lockfile is updated to a toolkit version that includes the new next_version parameter. Please bump the toolkit dependency (Gemfile.lock) alongside this change (or otherwise ensure the new toolkit version is in use in CI).

Suggested change
next_version: release_version_next,
version: release_version_next,

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🎗️ Reminder to update release-toolkit once a new version has been released

@iangmaia iangmaia marked this pull request as ready for review March 30, 2026 13:44
@iangmaia iangmaia requested a review from a team as a code owner March 30, 2026 13:44
@iangmaia iangmaia requested review from AliSoftware, MiSikora, mokagio, sztomek and twstokes and removed request for a team March 30, 2026 13:44
@iangmaia iangmaia added [Type] Tooling Related to the Gradle build scripts and the setup or maintenance of the project build process. [Area] Tooling labels Mar 30, 2026
Copy link
Copy Markdown
Contributor

@AliSoftware AliSoftware left a comment

Choose a reason for hiding this comment

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

Approving to unblock once you'll have 🎗️ pushed a new version of release-toolkit and updated the Gemfile accordingly

14.3.0 adds the `next_version` parameter to the release notes update
actions, which the previous commits in this branch already use.

---

Generated with the help of Claude Code, https://code.claude.com

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mokagio
Copy link
Copy Markdown
Contributor

mokagio commented Mar 31, 2026

Took the baton and pointed the gem to the stable version @iangmaia released earlier. Going to merge now.

@mokagio mokagio merged commit ee9e1c5 into main Mar 31, 2026
17 checks passed
@mokagio mokagio deleted the iangmaia/fix-release-notes-version-bump branch March 31, 2026 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Area] Tooling [Type] Tooling Related to the Gradle build scripts and the setup or maintenance of the project build process.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants