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

fix: compare with base vs. last commit #223

Merged
merged 1 commit into from
Apr 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/review.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ export const codeReview = async (
core.warning(`Skipped: files data is missing`)
return
}
// Filter out any file that is not changed compared to the target branch
const files = incrementalFiles.filter(incrementalChange =>
targetBranchFiles.some(
changeRelativeToTargetBranch =>
changeRelativeToTargetBranch.filename === incrementalChange.filename

// Filter out any file that is changed compared to the incremental changes
const files = targetBranchFiles.filter(targetBranchFile =>
incrementalFiles.some(
incrementalFile => incrementalFile.filename === targetBranchFile.filename
)
)

Expand Down