mirror of
https://github.com/tj-actions/changed-files
synced 2024-12-16 19:27:39 +00:00
fix: bug returning empty output for pull request close event (#1556)
Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
parent
fe0fb71961
commit
246636f5fa
3 changed files with 10 additions and 6 deletions
BIN
dist/index.js
generated
vendored
BIN
dist/index.js
generated
vendored
Binary file not shown.
BIN
dist/index.js.map
generated
vendored
BIN
dist/index.js.map
generated
vendored
Binary file not shown.
|
@ -465,13 +465,17 @@ export const getSHAForPullRequestEvent = async (
|
|||
}
|
||||
}
|
||||
} else {
|
||||
previousSha = await getRemoteBranchHeadSha({
|
||||
cwd: workingDirectory,
|
||||
branch: targetBranch
|
||||
})
|
||||
|
||||
if (!previousSha) {
|
||||
if (github.context.payload.action === 'closed') {
|
||||
previousSha = github.context.payload.pull_request?.base?.sha
|
||||
} else {
|
||||
previousSha = await getRemoteBranchHeadSha({
|
||||
cwd: workingDirectory,
|
||||
branch: targetBranch
|
||||
})
|
||||
|
||||
if (!previousSha) {
|
||||
previousSha = github.context.payload.pull_request?.base?.sha
|
||||
}
|
||||
}
|
||||
|
||||
if (isShallow) {
|
||||
|
|
Loading…
Reference in a new issue