coderabbitai / ai-pr-reviewer

AI-based Pull Request Summarizer and Reviewer with Chat Capabilities.
https://coderabbit.ai
MIT License
1.42k stars 261 forks source link

Use GitHub Review API for comments #373

Closed harjotgill closed 12 months ago

harjotgill commented 12 months ago

Summary by OpenAI

**New Feature**
- Added support for GitHub Review API in comments.
- Introduced a new method `deletePendingReview` to delete pending reviews.
- Enhanced `submitReview` method to handle review comments and create reviews.
- Updated logic for deleting and updating review comments.
- Reduced `maxRetries` value from 10 to 3 for improved performance.

> 🎉 Here's to the code that now gleams,
> With reviews flowing like streams.
> Deleting, updating, no more waiting,
> For our efficiency, it seems. 🚀
> Max retries cut down in size,
> Oh, how time flies! 🕰️
> Celebrate this PR's rise,
> To the occasion, it truly ties. 🎈
github-actions[bot] commented 12 months ago

:robot: OpenAI

The changes primarily revolve around enhancing the usage of the GitHub Review API in src/commenter.ts and src/octokit.ts. The modifications include improved handling of review comments, creation and deletion of reviews, and listing reviews. A new method for deleting pending reviews has been introduced, and the retry limit has been reduced from 10 to 3.

Files Summary
src/commenter.ts, src/octokit.ts The code now leverages the GitHub Review API more effectively. Changes include better management of review comments, addition of a method to delete pending reviews, and modification of the submitReview method to handle review comments and create reviews. The retry limit in the configuration object has been reduced from 10 to 3.

Chat with 🤖 OpenAI Bot (@openai)

Code suggestions

Ignoring further reviews


Files ignored due to filter (1) ### Ignored files * dist/index.js

In the recent run, only the files that changed from the base of the PR and between aa221740ca92cb98a9a68e4e6ae59506b3595e0e and a0771cc9eacfea24f91db9742c5eeeefbe1e6726 commits were reviewed.