From e3cac49049b6b59f85d64402e7477f0a211ceba0 Mon Sep 17 00:00:00 2001 From: Aravind <63452117+codesculpture@users.noreply.github.com> Date: Sun, 18 Feb 2024 04:01:02 +0530 Subject: [PATCH] fix(payload_api, git_diff): Accessing correct property in payload and Replacing --quiet with --no-patch in git diff (#1934) --- src/commitSha.ts | 2 +- src/utils.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commitSha.ts b/src/commitSha.ts index 2d6b2985..8db28b31 100644 --- a/src/commitSha.ts +++ b/src/commitSha.ts @@ -429,7 +429,7 @@ export const getSHAForPullRequestEvent = async ( if ( !github.context.payload.pull_request?.base?.ref || - github.context.payload.head?.repo?.fork === 'true' + github.context.payload.pull_request?.head?.repo?.fork === true ) { diff = '..' } diff --git a/src/utils.ts b/src/utils.ts index f1672d70..d550b332 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -908,7 +908,7 @@ export const canDiffCommits = async ({ } else { const {exitCode, stderr} = await exec.getExecOutput( 'git', - ['diff', '--quiet', sha1, sha2], + ['diff', '--no-patch', sha1, sha2], { cwd, ignoreReturnCode: true,