coderabbitai / ai-pr-reviewer

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

don't send entire file when reviewing #263

Closed harjotgill closed 1 year ago

harjotgill commented 1 year ago

Summary by OpenAI

Release Notes

"Codebase refined,
Performance enhanced,
Bugs squashed,
Celebrate with a 🎉!"

github-actions[bot] commented 1 year ago

:robot: OpenAI

Summary of Changes

The pull request includes several changes to improve the functionality and usability of the codebase. The changes include updating constants, increasing limits, improving message formatting, adding error handling, and logging statements. Overall, the changes seem to be focused on enhancing the performance, security, and maintainability of the system.

File Summary
commenter.ts Updates the DESCRIPTION_START_TAG constant to use a template literal and modifies the newDescription variable to append the release notes message without adding an extra newline.
limits.ts Increases the maxTokens limit from 3900 to 4000 and provides a margin of 100 tokens for requestTokens.
prompts.ts Improves the format and content of messages that are sent during a GitHub pull request review. Suggestions include using constants instead of hardcoding strings, adding error handling, and using a template engine to generate message content.
review.ts Adds logging statements to the code and includes minor changes to the codeReview and summarize functions. It also adds a check to limit the number of patches sent in a single request.

Overall, the changes seem to be well-considered and focused on improving the quality and maintainability of the codebase. The suggestions provided for each file should help to further enhance the functionality and usability of the system.


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 60b7c638c913b8f7e8631e9773811a34da5d00c9 and 219b19745f239124a0d8b043b2801146b11f7be6 commits were reviewed.

Files not reviewed due to simple changes (2) ### Skipped review in the recent run * src/commenter.ts * src/review.ts