feat: IssueQuery builder with fluent filtering API#28
feat: IssueQuery builder with fluent filtering API#28github-actions[bot] merged 1 commit intomasterfrom
Conversation
Implements a fluent query builder for filtering and retrieving GitHub issues with chainable methods for state, labels, assignees, authors, time-based filtering, sorting, and pagination. Features: - State filtering (whereOpen, whereClosed, whereState) - Label filtering (whereLabel, whereLabels) - Assignee filtering (assignedTo, whereUnassigned) - Author filtering (createdBy, mentioning) - Time-based filtering (createdAfter, updatedBefore, older) - Sorting (orderBy, orderByCreated, orderByUpdated) - Pagination (perPage, page) - Terminal methods (get, first, count, exists) All methods are fully tested with 100% code coverage and pass PHPStan analysis. Closes #20
|
Warning Rate limit exceeded@jordanpartridge has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 10 minutes and 7 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (5)
✨ Finishing touches
🧪 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 |
Summary
Implements a comprehensive query builder for GitHub issues with a fluent, chainable API. This closes #20.
Features
State Filtering
whereOpen()- Filter for open issueswhereClosed()- Filter for closed issueswhereState(string $state)- Filter by custom stateLabel Filtering
whereLabel(string $label)- Filter by single labelwhereLabels(array $labels)- Filter by multiple labelsAssignee Filtering
assignedTo(string $username)- Filter by assigneewhereUnassigned()- Filter for unassigned issuesAuthor Filtering
createdBy(string $username)- Filter by issue creatormentioning(string $username)- Filter by mentioned userTime-Based Filtering
createdAfter(string|DateTime $date)- Filter by creation dateupdatedBefore(string|DateTime $date)- Filter by update dateolder(int $days)- Convenience method for stale issuesSorting
orderBy(string $field, string $direction)- Sort by any fieldorderByCreated(string $direction = 'desc')- Sort by creation dateorderByUpdated(string $direction = 'desc')- Sort by update datePagination
perPage(int $perPage)- Set results per pagepage(int $page)- Set page numberTerminal Methods
get(): Collection- Execute and get all resultsfirst(): ?Issue- Get first resultcount(): int- Count resultsexists(): bool- Check if any results existUsage Example
Test Coverage
Architecture Notes
$thisupdatedBefore(not supported by GitHub API)