Open
Conversation
…sibility Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 task
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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