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

Commit 163d9f7

Browse files
committed
fix incremental reviews
1 parent 6cf5176 commit 163d9f7

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

dist/index.js

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/commenter.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ ${tag}`
9292
)
9393
// remove the first and last line
9494
const lines = content.split('\n')
95+
if (lines.length < 3) {
96+
return ''
97+
}
9598
lines.shift()
9699
lines.pop()
97100
return lines.join('\n')

src/review.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export const codeReview = async (
7272
inputs.raw_summary = commenter.get_raw_summary(existing_summarize_cmt.body)
7373
}
7474
const existing_commit_ids_block = getReviewedCommitIdsBlock(
75-
inputs.raw_summary
75+
existing_summarize_cmt?.body
7676
)
7777

7878
const allCommitIds = await getAllCommitIds()

0 commit comments

Comments
 (0)