mirror of
https://github.com/dorny/paths-filter.git
synced 2026-07-07 14:55:37 +00:00
Enhance base comparison with SHA resolution
This commit is contained in:
parent
62f774ae39
commit
cbd5f6aab9
@ -153,7 +153,9 @@ async function getChangedFilesFromGit(base: string, head: string, initialFetchDe
|
||||
}
|
||||
|
||||
const isBaseSha = git.isGitSha(base)
|
||||
const isBaseSameAsHead = base === head
|
||||
const baseSha = await git.resolveRefToSha(base)
|
||||
const headSha = await git.resolveRefToSha(head)
|
||||
const isBaseSameAsHead = base === head || baseSha === headSha
|
||||
|
||||
// If base is commit SHA we will do comparison against the referenced commit
|
||||
// Or if base references same branch it was pushed to, we will do comparison against the previously pushed commit
|
||||
|
||||
Loading…
Reference in New Issue
Block a user