Skip to content

ci(release): use get_prs_between_tags with fail_on_error - #607

Merged
mokagio merged 4 commits into
trunkfrom
cmm-2332-use-get_prs_between_tags-for-release-notes-once-release
Aug 27, 2026
Merged

ci(release): use get_prs_between_tags with fail_on_error#607
mokagio merged 4 commits into
trunkfrom
cmm-2332-use-get_prs_between_tags-for-release-notes-once-release

Conversation

@mokagio

@mokagio mokagio commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

AI-generated below:

What?

Bumps fastlane-plugin-wpmreleasetoolkit to 15.0.0 and switches generated_release_notes back to the get_prs_between_tags action, now passing fail_on_error: true.

Closes CMM-2332 / #591.

Why?

#588 deliberately bypassed the action and called GithubHelper#generate_release_notes directly, because the action rescued every StandardError and returned the message as the changelog — a transient API failure would publish a release whose notes read ❌ Error computing the list of PRs…. We push the tag before creating the Release, so that has to fail the step instead.

release-toolkit#772 added the opt-out, and it has now shipped in 15.0.0, so the workaround can go.

How?

fail_on_error: true is load-bearing rather than cosmetic, which is the one thing the diff doesn't say on its own — hence the comment that replaces the old workaround note.

The major bump is manual: Dependabot only proposes this repo's toolkit updates through the ruby-minor-and-patch group. Neither of 15.0.0's breaking changes reaches this repo — there are no *_build_preflight call sites, and EnvManager now populating the process ENV by default is a no-op here, where no .env file ships.

Testing Instructions

The release lane only runs on CI, so I exercised the action directly against the live API from this branch:

bundle exec fastlane run get_prs_between_tags \
  repository:wordpress-mobile/GutenbergKit tag_name:v0.19.0 \
  previous_tag:v0.18.1 fail_on_error:true

Returns the v0.18.1 → v0.19.0 notes. Swapping in a nonexistent previous_tag exits 1 with Octokit::BadRequest: 400 - Invalid previous_tag parameter, where the same call with fail_on_error:false exits 0 and hands back the ❌ Error computing the list of PRs… string — i.e. exactly the failure this change exists to prevent.

Heads-up for whoever reads the next release page: the action rewrites GitHub's ## What's Changed heading into ## New PRs since [<previous_tag>](<link>).

mokagio and others added 2 commits August 27, 2026 17:37
15.0.0 is the first release carrying `get_prs_between_tags`' `fail_on_error:`
([wordpress-mobile/release-toolkit#772](wordpress-mobile/release-toolkit#772)), which the next commit adopts.

Major bump, so Dependabot's `ruby-minor-and-patch` group would never have
proposed it.
Its two breaking changes leave this repo alone: no `*_build_preflight` call
sites, and `EnvManager` populating the process `ENV` by default is a no-op
where no `.env` file ships.

For [CMM-2332](https://linear.app/a8c/issue/CMM-2332).

---

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

Co-Authored-By: Claude Code Opus 5 <noreply@anthropic.com>
Restores the action over the helper it wraps, now that `fail_on_error:` lets
the step fail instead of publishing an error message as the release body.

Verified against the live API on both paths: a real tag pair returns the
notes, and a bogus `previous_tag` now raises `Octokit::BadRequest` where
`fail_on_error: false` returns "❌ Error computing the list of PRs…" as the
changelog.

One visible change: the action rewrites GitHub's `## What's Changed` heading
into `## New PRs since [<previous_tag>](<link>)`.

For [CMM-2332](https://linear.app/a8c/issue/CMM-2332).

---

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

Co-Authored-By: Claude Code Opus 5 <noreply@anthropic.com>
@mokagio
mokagio requested a review from a team as a code owner August 27, 2026 07:38
Copilot AI lite review requested due to automatic review settings August 27, 2026 07:38
@mokagio mokagio self-assigned this Aug 27, 2026
@github-actions github-actions Bot added the [Type] Build Tooling Issues or PRs related to build tooling label Aug 27, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 CI release tooling to use the get_prs_between_tags Fastlane action again (now that it can fail the lane on API errors), preventing releases from being published with an error string as the GitHub Release body.

Changes:

  • Bump fastlane-plugin-wpmreleasetoolkit from 14.11.3 to 15.0.0.
  • Switch generated_release_notes from calling Fastlane::Helper::GithubHelper#generate_release_notes directly back to get_prs_between_tags.
  • Pass fail_on_error: true (and keep token plumbing) so API failures stop the release step.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
Gemfile Bumps the release-toolkit plugin constraint to ~> 15.0.
Gemfile.lock Locks the plugin to 15.0.0 with updated checksum.
fastlane/Fastfile Uses get_prs_between_tags(..., fail_on_error: true) for release notes generation to fail hard on API errors.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@wpmobilebot

wpmobilebot commented Aug 27, 2026

Copy link
Copy Markdown

XCFramework Build

This PR's XCFramework is available for testing. Add the following to your Package.swift:

.package(url: "https://github.com/wordpress-mobile/GutenbergKit", branch: "pr-build/607")

Built from aea5c59

@iangmaia iangmaia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍 Thanks for addressing this.

Comment thread fastlane/Fastfile
Comment thread fastlane/Fastfile Outdated
Co-authored-by: Gio Lodi <giovanni.lodi42@gmail.com>
Comment thread fastlane/Fastfile Outdated
Co-authored-by: Gio Lodi <giovanni.lodi42@gmail.com>
@mokagio
mokagio enabled auto-merge (squash) August 27, 2026 09:16
@mokagio
mokagio merged commit a7c2e43 into trunk Aug 27, 2026
23 checks passed
@mokagio
mokagio deleted the cmm-2332-use-get_prs_between_tags-for-release-notes-once-release branch August 27, 2026 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Build Tooling Issues or PRs related to build tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants