Add connector ID field to list and get commands - #25
Conversation
Neither command surfaced the connector identifier, so there was no way to discover the value that `wp connectors get <connector>` expects as its positional argument. Add an `id` field to the connector item and include it as the first default field for both subcommands. Fixes #24 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FG8X9hSsPjFYsHD3KyDwkJ
|
Warning Review limit reached
Next review available in: 54 minutes Limit details: You’ve used all 1 included review currently available under your plan. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughConnector list and get commands now expose connector IDs in default output. Acceptance tests verify IDs across JSON, table, and key-value formats, including passing list results to get. README examples show the new fields. ChangesConnector IDs
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: 🔵 Low · up to The change is mergeable with owner awareness that the integration test should verify passing an ID returned by the list command into the get command; otherwise, the new displayed identifier behavior is localized and low risk. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Behat renders WP-CLI's table format as tab-separated values without box borders, so the `| id` assertions could never match. Assert against the actual tab-separated layout instead, which also pins the column order. Also capture a connector ID from `wp connectors list` and pass it to `wp connectors get`, so the scenario exercises the round trip rather than testing both commands against a hard-coded ID. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FG8X9hSsPjFYsHD3KyDwkJ
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary
This change adds the connector ID as a displayed field in the
wp connectors listandwp connectors getcommands, making it easier for users to identify and reference connectors by their unique identifier.Key Changes
idfield to default fields: The connector ID is now included as the first field in thedefault_fieldsarray inConnectors_Command.phpbuild_connector_item()method: Modified to include theidfield in the returned connector item arrayget()command: Addedidto the default fields displayed when retrieving a specific connectoridfield appears in both JSON and table format outputsidcolumn in list and get command outputsImplementation Details
idfield is positioned as the first column in table output for easy identificationbuild_connector_item()method which receives it as a parameterhttps://claude.ai/code/session_01FG8X9hSsPjFYsHD3KyDwkJ
Summary by CodeRabbit
New Features
Documentation