Skip to content

Conversation

@jordanpartridge
Copy link
Contributor

Summary

  • Implemented IssueQueryInterface with full backward compatibility
  • Added interface-compliant methods: state(), labels(), assignee(), creator(), mentioned(), since(), sort(), direction()
  • Maintained existing methods as aliases (e.g., whereState() calls state())
  • Added comprehensive test suite for interface compliance
  • All existing tests continue to pass

Implementation Details

New Interface Methods

Issues::query('owner/repo')
    ->state('open')              // New interface method
    ->labels(['bug', 'urgent'])  // Accepts array or string
    ->assignee('username')       // New interface method
    ->creator('author')          // New interface method
    ->mentioned('user')          // New interface method
    ->since(now()->subWeek())    // Accepts DateTimeInterface
    ->sort('created')            // New interface method
    ->direction('desc')          // New interface method
    ->get();

Backward Compatibility

All existing methods remain functional:

  • whereState() → calls state()
  • whereLabel(), whereLabels() → calls labels()
  • assignedTo() → calls assignee()
  • createdBy() → calls creator()
  • mentioning() → calls mentioned()
  • createdAfter() → calls since()
  • orderBy() → calls sort() and direction()

Test Coverage

  • Added 10 new tests for interface method compliance
  • All 38 existing tests continue to pass
  • 100% code coverage maintained
  • Pint formatting applied

Test plan

  • Run full test suite: ./vendor/bin/pest
  • Verify 100% coverage: ./vendor/bin/pest --coverage --min=100
  • Run Pint formatting: ./vendor/bin/pint
  • All quality gates pass

Closes #20

Implemented IssueQueryInterface with full backward compatibility:
- Added interface methods: state(), labels(), assignee(), creator(), mentioned(), since(), sort(), direction()
- Maintained existing methods as aliases for backward compatibility
- Added comprehensive tests for interface compliance
- All tests passing with 100% coverage
- Pint formatting applied

The fluent API supports chainable filtering for GitHub issues with powerful methods like:
Issues::query('owner/repo')->state('open')->labels(['bug'])->assignee('username')->get()
@coderabbitai
Copy link

coderabbitai bot commented Dec 20, 2025

Warning

Rate limit exceeded

@jordanpartridge has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 26 minutes and 22 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

📥 Commits

Reviewing files that changed from the base of the PR and between 96a2f1e and bb3ecd3.

📒 Files selected for processing (2)
  • src/Services/IssueQuery.php (5 hunks)
  • tests/Unit/Services/IssueQueryTest.php (1 hunks)
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/issue-query-builder

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 and usage tips.

@github-actions github-actions bot merged commit aaa4003 into master Dec 20, 2025
2 checks passed
@github-actions github-actions bot deleted the feature/issue-query-builder branch December 20, 2025 05:58
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.

Implement Core IssueQuery Builder with Fluent Filtering API

2 participants