diff --git a/dist/index.js b/dist/index.js index 6c5360d..c012e6c 100644 --- a/dist/index.js +++ b/dist/index.js @@ -38102,9 +38102,9 @@ function findLastSkippedCommitAfterSha(baseSha, headSha, messagesToSkip = [], br newBaseSha = commit.sha; continue; } - return commit.sha; + return commit.sha === headSha ? baseSha : commit.sha; } - return newBaseSha; + return newBaseSha === headSha ? baseSha : newBaseSha; }); } /** diff --git a/find-successful-workflow.ts b/find-successful-workflow.ts index 3da4f2a..dc0fa72 100644 --- a/find-successful-workflow.ts +++ b/find-successful-workflow.ts @@ -330,9 +330,9 @@ async function findLastSkippedCommitAfterSha( newBaseSha = commit.sha; continue; } - return commit.sha; + return commit.sha === headSha ? baseSha : commit.sha; } - return newBaseSha; + return newBaseSha === headSha ? baseSha : newBaseSha; } /**