Skip to content

MT-22678: Add name search filter to contact lists listing#116

Open
Rabsztok wants to merge 2 commits into
mainfrom
MT-22678-ruby-contact-list-search
Open

MT-22678: Add name search filter to contact lists listing#116
Rabsztok wants to merge 2 commits into
mainfrom
MT-22678-ruby-contact-list-search

Conversation

@Rabsztok

@Rabsztok Rabsztok commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Motivation

https://railsware.atlassian.net/browse/MT-22678

Changes

  • Add an optional search keyword to ContactListsApi#list — filters contact lists by name (case-insensitive prefix match), per the OpenAPI GET /api/contacts/lists param. When omitted the request is unchanged, so the call stays backward compatible.

How to test

  • client.contact_lists.list — returns all contact lists (unchanged behaviour).
  • client.contact_lists.list(search: "news") — returns only lists whose name starts with "news" (case-insensitive).

Summary by CodeRabbit

  • New Features

    • Added support for filtering contact lists by name using a case-insensitive prefix search.
    • Updated contact list examples to demonstrate the new search option.
  • Documentation

    • Updated the supported functionality and examples documentation to include contact list filtering.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d869a523-5e91-4a32-86c1-0b8b12d8071e

📥 Commits

Reviewing files that changed from the base of the PR and between c9c0b5a and b6bd448.

📒 Files selected for processing (4)
  • README.md
  • examples/contacts_api.rb
  • lib/mailtrap/contact_lists_api.rb
  • spec/mailtrap/contact_lists_api_spec.rb

📝 Walkthrough

Walkthrough

Contact list listing now accepts an optional search: keyword argument for name filtering. The API forwards the query parameter, tests cover the filtered request and response, and the example and README document the usage.

Changes

Contact list name filtering

Layer / File(s) Summary
API search support and verification
lib/mailtrap/contact_lists_api.rb, spec/mailtrap/contact_lists_api_spec.rb
ContactListsAPI#list forwards a non-nil search query parameter, with a spec verifying the request and filtered result.
Example and documentation updates
examples/contacts_api.rb, README.md
The contacts example and supported functionality list demonstrate name-prefix filtering through list(search:).

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

Suggested reviewers: i7an, IgorDobryn, piobeny

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding a name search filter to contact list listing.
Description check ✅ Passed The description covers Motivation, Changes, and How to test; the Images and GIFs section is missing but non-critical.
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 MT-22678-ruby-contact-list-search

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.

@Rabsztok

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Rabsztok Rabsztok requested a review from mklocek July 10, 2026 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants