Skip to content

Add connector ID field to list and get commands - #25

Merged
swissspidy merged 2 commits into
mainfrom
claude/wp-cli-ai-command-24-175ki2
Aug 17, 2026
Merged

Add connector ID field to list and get commands#25
swissspidy merged 2 commits into
mainfrom
claude/wp-cli-ai-command-24-175ki2

Conversation

@swissspidy

@swissspidy swissspidy commented Aug 17, 2026

Copy link
Copy Markdown
Member

Summary

This change adds the connector ID as a displayed field in the wp connectors list and wp connectors get commands, making it easier for users to identify and reference connectors by their unique identifier.

Key Changes

  • Added id field to default fields: The connector ID is now included as the first field in the default_fields array in Connectors_Command.php
  • Updated build_connector_item() method: Modified to include the id field in the returned connector item array
  • Updated get() command: Added id to the default fields displayed when retrieving a specific connector
  • Updated documentation:
    • Feature tests now verify that the id field appears in both JSON and table format outputs
    • README examples updated to show the id column in list and get command outputs
    • Command documentation examples updated to reflect the new column layout

Implementation Details

  • The id field is positioned as the first column in table output for easy identification
  • The connector ID is passed through from the build_connector_item() method which receives it as a parameter
  • All existing functionality is preserved; this is purely additive
  • A new test scenario validates that connector IDs from the list command can be successfully passed to the get command

https://claude.ai/code/session_01FG8X9hSsPjFYsHD3KyDwkJ

Summary by CodeRabbit

  • New Features

    • Connector list and detail views now display connector IDs.
    • JSON responses include connector IDs for easier identification.
    • Connector IDs from list results can be used to retrieve connector details.
  • Documentation

    • Updated connector command examples to show the new ID fields.

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
Copilot AI lite review requested due to automatic review settings August 17, 2026 10:13

This comment was marked as resolved.

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@swissspidy, you've reached your PR review limit, so we couldn't start this review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 41b3e6a2-ae4e-4fe5-b70f-7bed132a4315

📥 Commits

Reviewing files that changed from the base of the PR and between 2ad9820 and afa36c7.

📒 Files selected for processing (1)
  • features/connectors.feature
📝 Walkthrough

Walkthrough

Connector 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.

Changes

Connector IDs

Layer / File(s) Summary
Expose connector IDs
src/Connectors_Command.php, README.md
Connector items now include id. Default list and get output, documentation, and examples display connector IDs.
Verify connector IDs
features/connectors.feature
Acceptance tests verify connector IDs in JSON, table, and key-value output. A scenario verifies that IDs from list can be passed to get.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: 🔵 Low · up to 2ad98

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: brianhenryie, ernilambar, janw-me

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes adding the connector ID field to the list and get commands.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/wp-cli-ai-command-24-175ki2

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added command:connectors Related to 'connectors' command command:connectors-get Related to 'connectors get' command command:connectors-list Related to 'connectors list' command enhancement New feature or request scope:documentation Related to documentation scope:testing Related to testing labels Aug 17, 2026
@swissspidy swissspidy added this to the 1.0.3 milestone Aug 17, 2026
coderabbitai[bot]

This comment was marked as resolved.

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

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@swissspidy swissspidy linked an issue Aug 17, 2026 that may be closed by this pull request
@swissspidy
swissspidy merged commit 959765d into main Aug 17, 2026
46 checks passed
@swissspidy
swissspidy deleted the claude/wp-cli-ai-command-24-175ki2 branch August 17, 2026 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

command:connectors Related to 'connectors' command command:connectors-get Related to 'connectors get' command command:connectors-list Related to 'connectors list' command enhancement New feature or request scope:documentation Related to documentation scope:testing Related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose connector ID in wp connectors list and wp connectors get

3 participants