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

submit empty review when there are no comments #393

Closed harjotgill closed 11 months ago

harjotgill commented 11 months ago

Summary by CodeRabbit

Release Notes

🎉 Here's to the code that's ever so bright,
With new features added, it takes flight.
No comment left behind, each one in sight,
And only reviewing when the patches are right! 🚀

github-actions[bot] commented 11 months ago

Image description CodeRabbit

Walkthrough: The changes primarily focus on enhancing the review submission process in the code. They ensure that an empty review is submitted when there are no comments, and a review is only performed if there are patches packed. This improves the efficiency of the review process.

Changes:

Files Summary
src/commenter.ts A new condition has been added to submit an empty review when there are no comments. If there are comments, it proceeds to submit the review as before.
src/review.ts The 'perform review' block has been moved inside a condition that checks if there are patches packed. This ensures that the review is only performed when necessary.

Notes ### Chat with Image description CodeRabbit Bot (`@coderabbitai`) - Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file. - Invite the bot into a review comment chain by tagging `@coderabbitai` in a reply. ### Code suggestions - The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned. - You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off. ### Ignoring further reviews - Type `@coderabbitai: ignore` anywhere in the PR description to ignore further reviews from the bot.