Conversation
…sibility Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
There was a problem hiding this comment.
Pull request overview
Adds a new Fastlane action to query the WordPress.com REST API for Apps CDN build posts, enabling lanes (e.g., Studio release automation) to locate builds by visibility and version without relying on hard-coded post IDs.
Changes:
- Introduced
list_apps_cdn_buildsaction with server-side visibility filtering and client-side version filtering. - Added RSpec coverage for the new action behavior and error/validation paths.
- Updated
CHANGELOG.mdto document the new action.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
lib/fastlane/plugin/wpmreleasetoolkit/actions/common/list_apps_cdn_builds.rb |
Implements the new list_apps_cdn_builds action and its parameter validation / API request logic. |
spec/list_apps_cdn_builds_spec.rb |
Adds tests for listing behavior, filtering, error handling, and parameter validation. |
CHANGELOG.md |
Documents the new action under Trunk → New Features. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
lib/fastlane/plugin/wpmreleasetoolkit/actions/common/list_apps_cdn_builds.rb
Outdated
Show resolved
Hide resolved
- Use values.first['name'] instead of keys.first for term parsing (more robust)
- Extract term_name helper to avoid long safe-navigation chains
- Remove after { WebMock.allow_net_connect! } that leaked into other specs
Co-Authored-By: Claude Opus 4.6 <[email protected]>
The v1.1 API returns 500 for a8c_cdn_build custom post types. Replaces visibility filter with post_status filter (draft/publish) and adds server-side version filtering via taxonomy term ID lookup. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Should we then update |
|
No longer needed. The new Studio PR (Automattic/studio#2724) uses the internal visibility approach with post IDs embedded in the GitHub release body, so there's no need to query the CDN API for builds. Only the |
Fixes AINFRA-2102
Summary
Adds a new
list_apps_cdn_buildsFastlane action that queries the WP REST API v2 to list builds on the Apps CDN. Supports server-side filtering bypost_status(draft/publish) andversion(via taxonomy term ID lookup). Returns an array of build metadata (post_id, title, status, version, visibility, platform, build_type).Context
This enables Studio's
publish_releaselane to query the CDN directly for draft builds by version, then publish them — rather than embedding post IDs in the GitHub release body (which is fragile). See companion Studio PR for the consumer side.Note: The v1.1 API returns 500 for
a8c_cdn_buildcustom post types, which is why this action uses the WP v2 endpoint (/wp/v2/sites/{site_id}/a8c_cdn_build). Additionally, CDN posts withvisibility: internalare completely hidden from all listing queries by the CDN plugin, so the draft/publish approach is used instead of internal/external visibility for gating builds before release.Test plan
bundle exec rspec spec/list_apps_cdn_builds_spec.rb— 12 examples, 0 failuresbundle exec rubocop— no offenses on new files🤖 Generated with Claude Code