fix: bug retrieving base sha for force push (#1216)

This commit is contained in:
Tonye Jack
2023-06-01 21:16:31 -06:00
committed by GitHub
parent eeb5a258f5
commit 47db5bd435
3 changed files with 5 additions and 10 deletions

5
dist/index.js generated vendored
View File

@@ -435,10 +435,7 @@ const getSHAForPullRequestEvent = (inputs, env, workingDirectory, isShallow, has
if (!previousSha) {
if (inputs.sinceLastRemoteCommit) {
previousSha = env.GITHUB_EVENT_BEFORE;
if (!previousSha) {
previousSha = yield (0, utils_1.getParentSha)({ cwd: workingDirectory });
}
if (!previousSha) {
if ((yield (0, utils_1.verifyCommitSha)({ sha: previousSha, cwd: workingDirectory })) !== 0) {
previousSha = env.GITHUB_EVENT_PULL_REQUEST_BASE_SHA;
}
}