mirror of
https://github.com/dorny/paths-filter.git
synced 2026-06-28 20:30:43 +00:00
Enhance base comparison with SHA resolution
This commit is contained in:
parent
62f774ae39
commit
cbd5f6aab9
1 changed files with 3 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue