From addfcf873226f2bb86d2301b841b63c79e362a4c Mon Sep 17 00:00:00 2001 From: Harjot Gill Date: Thu, 20 Apr 2023 18:12:50 -0700 Subject: [PATCH] fix: compare with base vs. last commit --- src/review.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/review.ts b/src/review.ts index ab0fd596..4901b5dd 100644 --- a/src/review.ts +++ b/src/review.ts @@ -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 ) )