feat: return typed DTOs from files/checks/commits#11
Conversation
|
Warning Rate limit exceeded@jordanpartridge has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 12 minutes and 24 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 (8)
✨ 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 |
This change enhances type safety by returning strongly-typed DTOs instead of raw arrays from the files(), checks(), and commits() methods. Changes: - Created File DTO for file change information - Created Commit DTO for commit data - Created CommitAuthor DTO for git-level author/committer info - Updated files() to return File[] instead of array - Updated checks() to return CheckRun[] instead of array - Updated commits() to return Commit[] instead of array - Added comprehensive test coverage for all new DTOs - Updated existing tests to validate typed return values All DTOs follow the existing pattern with: - Readonly properties - fromArray() factory method - toArray() serialization method - Helper methods (isAdded(), isModified(), etc.) Fixes #5
29e9dba to
e5c6336
Compare
Summary
FileDTO for file change information with helper methods (isAdded(),isModified(),isRemoved(),isRenamed())CommitDTO for commit data including SHA, message, author/committer infoCommitAuthorDTO for git-level author/committer details (name, email, date)files()method to returnFile[]instead of raw arrayschecks()method to returnCheckRun[]instead of raw arrayscommits()method to returnCommit[]instead of raw arraysAll new DTOs follow the existing pattern with readonly properties,
fromArray()factory methods, andtoArray()serialization.Test Plan
Fixes #5