feat: add support for complex filters (#1265)

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: tj-actions[bot] <109116665+tj-actions-bot@users.noreply.github.com>
This commit is contained in:
Tonye Jack
2023-06-16 00:17:13 -06:00
committed by GitHub
parent ea90b5ced9
commit c25c77a67a
15 changed files with 26879 additions and 548 deletions

View File

@@ -379,9 +379,18 @@ export const getSHAForPullRequestEvent = async (
0)
) {
core.warning(
'Unable to locate the remote branch head sha. Falling back to the pull request base sha.'
'Unable to locate the remote branch head sha. Falling back to the previous commit in the local history.'
)
previousSha = env.GITHUB_EVENT_PULL_REQUEST_BASE_SHA
previousSha = await getParentSha({
cwd: workingDirectory
})
if (!previousSha) {
core.warning(
'Unable to locate the previous commit in the local history. Falling back to the pull request base sha.'
)
previousSha = env.GITHUB_EVENT_PULL_REQUEST_BASE_SHA
}
}
} else {
previousSha = await getRemoteBranchHeadSha({
@@ -395,12 +404,12 @@ export const getSHAForPullRequestEvent = async (
if (isShallow) {
if (
await canDiffCommits({
!(await canDiffCommits({
cwd: workingDirectory,
sha1: previousSha,
sha2: currentSha,
diff
})
}))
) {
core.debug(
'Merge base is not in the local history, fetching remote target branch...'