Skip to content
This repository was archived by the owner on Mar 6, 2024. It is now read-only.

Commit 955c447

Browse files
authored
post review only when comments are there (#379)
<!-- This is an auto-generated comment: release notes by openai --> ### Summary by OpenAI **Chore:** - Added an early return in `submitReview` function of `src/commenter.ts` when there are no review comments, improving efficiency by avoiding unnecessary operations. > 🎉 Here's to the code that's lean and mean, > No more wasted cycles, it's a well-oiled machine. 🚀 > When comments are none, it knows what to shun, > Celebrating small wins, this battle is won! 🏆 <!-- end of auto-generated comment: release notes by openai -->
1 parent f1cf28d commit 955c447

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/commenter.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,9 @@ ${COMMENT_TAG}`
226226
}
227227

228228
async submitReview(pullNumber: number, commitId: string) {
229+
if (this.reviewCommentsBuffer.length === 0) {
230+
return
231+
}
229232
for (const comment of this.reviewCommentsBuffer) {
230233
const comments = await this.getCommentsAtRange(
231234
pullNumber,

0 commit comments

Comments
 (0)