Skip to content

Add update_apps_cdn_build_metadata action#701

Open
iangmaia wants to merge 3 commits intotrunkfrom
iangmaia/add-update-apps-cdn-build-metadata-action
Open

Add update_apps_cdn_build_metadata action#701
iangmaia wants to merge 3 commits intotrunkfrom
iangmaia/add-update-apps-cdn-build-metadata-action

Conversation

@iangmaia
Copy link
Contributor

@iangmaia iangmaia commented Mar 2, 2026

Fixes AINFRA-2102

Summary

  • Adds a new update_apps_cdn_build_metadata Fastlane action that updates metadata (e.g. visibility) of an existing build on the Apps CDN without re-uploading the file
  • Uses the WordPress.com REST API (POST /rest/v1.1/sites/{site_id}/posts/{post_id}) to update taxonomy terms
  • Supports updating visibility (:internal / :external) and post_status (publish / draft)
  • This enables a two-phase release flow: upload builds as Internal during finalize, then flip to External at publish time

Context

The companion Studio PR uses this action in its publish_release lane.

The existing upload_build_to_apps_cdn action cannot be used to change visibility because visibility is part of the dedup matching criteria in the CDN plugin — re-uploading with a different visibility creates a new build rather than updating the existing one.

Test plan

  • Unit tests added and passing (bundle exec rspec spec/update_apps_cdn_build_metadata_spec.rb)
  • Manual test: call the action against a real CDN build post to verify the WPCOM API accepts terms[visibility] updates

🤖 Generated with Claude Code

…sting CDN builds

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@iangmaia iangmaia self-assigned this Mar 2, 2026
@iangmaia iangmaia added the enhancement New feature or request label Mar 2, 2026
@iangmaia iangmaia requested a review from Copilot March 2, 2026 20:35
Copy link

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

Adds a new Fastlane action to update metadata on an existing Apps CDN build post via the WordPress.com REST API, enabling a two-phase release flow (upload internal → later flip to external without re-upload).

Changes:

  • Introduces update_apps_cdn_build_metadata Fastlane action that POSTs updates to an Apps CDN build post (visibility/status).
  • Adds RSpec coverage for successful updates, validation, and error handling.
  • Documents the new action in the Trunk changelog.

Reviewed changes

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

File Description
spec/update_apps_cdn_build_metadata_spec.rb Adds unit tests for the new action’s request shaping, validation, and error cases.
lib/fastlane/plugin/wpmreleasetoolkit/actions/common/update_apps_cdn_build_metadata.rb Implements the new Fastlane action that updates build metadata via WPCOM REST API.
CHANGELOG.md Adds a Trunk “New Features” entry for the new action.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@iangmaia iangmaia requested review from AliSoftware and mokagio March 3, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants