feat: switch to use name status (#1230)

Co-authored-by: tj-actions[bot] <109116665+tj-actions-bot@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
Tonye Jack
2023-06-14 12:45:32 -06:00
committed by GitHub
parent 2d0b52f440
commit 174a2a6360
11 changed files with 1448 additions and 840 deletions

View File

@@ -370,11 +370,22 @@ export const getSHAForPullRequestEvent = async (
if (!previousSha) {
if (inputs.sinceLastRemoteCommit) {
previousSha = env.GITHUB_EVENT_BEFORE
previousSha =
env.GITHUB_EVENT_BEFORE ||
(await getRemoteBranchHeadSha({
cwd: workingDirectory,
branch: currentBranch
}))
if (
(await verifyCommitSha({sha: previousSha, cwd: workingDirectory})) !== 0
!previousSha ||
(previousSha &&
(await verifyCommitSha({sha: previousSha, cwd: workingDirectory})) !==
0)
) {
core.warning(
'Unable to locate the remote branch head sha. Falling back to the pull request base sha.'
)
previousSha = env.GITHUB_EVENT_PULL_REQUEST_BASE_SHA
}
} else {