diff --git a/dist/index.js b/dist/index.js index 607ab12..edad66c 100644 --- a/dist/index.js +++ b/dist/index.js @@ -38119,9 +38119,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 b00de99..2fe47e9 100644 --- a/find-successful-workflow.ts +++ b/find-successful-workflow.ts @@ -347,9 +347,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; } /**