fix: prevent similar commit hashes error when using the branch name (#1744)

Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
Tonye Jack
2023-11-27 00:54:44 -07:00
committed by GitHub
parent 2139fa1b6f
commit c634be959b
3 changed files with 5 additions and 5 deletions

View File

@@ -206,7 +206,7 @@ export const getSHAForNonPullRequestEvent = async (
}
}
if (!previousSha) {
if (!previousSha || previousSha === currentSha) {
core.debug('Getting previous SHA...')
if (inputs.since) {
core.debug(`Getting base SHA for '${inputs.since}'...`)
@@ -434,7 +434,7 @@ export const getSHAForPullRequestEvent = async (
diff = '..'
}
if (!previousSha) {
if (!previousSha || previousSha === currentSha) {
if (inputs.sinceLastRemoteCommit) {
previousSha = github.context.payload.before