feat: Implement Core PullRequestQuery Builder#38
Conversation
Enhanced QueryBuilder with comprehensive filtering and querying capabilities: - Added label filtering: whereLabel(), whereLabels() (match any), whereAllLabels() (match all) - Added execution methods: exists(), pluck() - Added state filter aliases: whereOpen(), whereClosed(), whereState(), whereAuthor() - Added ordering shortcuts: orderByCreated(), orderByUpdated(), orderByPopularity(), orderByLongRunning() - Added pagination alias: perPage() - Added repository alias: repo() - Implemented client-side filtering for whereAllLabels() All methods support fluent chaining and maintain existing QueryBuilder patterns. 100% test coverage with 20 new tests covering all enhanced features.
|
Caution Review failedThe pull request is closed. WalkthroughThe pull request adds 15 public convenience methods to the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
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 |
Summary
Implements the core PullRequestQuery builder with comprehensive fluent filtering API, addressing issue #20.
Enhanced Capabilities
Label Filtering
whereLabel(string $label)- Filter by single label (alias for existinglabel())whereLabels(array $labels)- Filter by multiple labels (match any)whereAllLabels(array $labels)- Filter by multiple labels (match all, client-side)Execution Methods
exists(): bool- Check if any results existpluck(string $key): array- Extract a single field from all resultsFluent Aliases
whereOpen(),whereClosed(),whereState()- State filtering aliaseswhereAuthor()- Author filtering aliasrepo()- Repository context aliasOrdering Shortcuts
orderByCreated(string $direction = 'desc')orderByUpdated(string $direction = 'desc')orderByPopularity()- Order by comment countorderByLongRunning()- Order by oldest updated firstPagination
perPage(int $count)- Alias fortake()Implementation Details
whereAllLabels()to support complex label matchingTest Coverage
Quality Gates
Closes #20
Summary by CodeRabbit
Release Notes
✏️ Tip: You can customize this high-level summary in your review settings.