remove: unused code (#2014)

This commit is contained in:
Tonye Jack
2024-03-26 16:49:39 -06:00
committed by GitHub
parent 2ca8dc42f6
commit 90941b398f
5 changed files with 38 additions and 128 deletions

View File

@@ -326,7 +326,6 @@ interface SHAForPullRequestEvent {
hasSubmodule: boolean
gitFetchExtraArgs: string[]
remoteName: string
isFork: boolean
}
export const getSHAForPullRequestEvent = async ({
@@ -335,8 +334,7 @@ export const getSHAForPullRequestEvent = async ({
isShallow,
hasSubmodule,
gitFetchExtraArgs,
remoteName,
isFork
remoteName
}: SHAForPullRequestEvent): Promise<DiffResult> => {
let targetBranch = github.context.payload.pull_request?.base?.ref
const currentBranch = github.context.payload.pull_request?.head?.ref
@@ -507,18 +505,14 @@ export const getSHAForPullRequestEvent = async ({
}
}
} else {
if (github.context.payload.action === 'closed' || isFork) {
previousSha = github.context.payload.pull_request?.base?.sha
} else {
previousSha = github.context.payload.pull_request?.base?.sha
if (!previousSha) {
previousSha = await getRemoteBranchHeadSha({
cwd: workingDirectory,
branch: targetBranch,
remoteName
remoteName,
branch: targetBranch
})
if (!previousSha) {
previousSha = github.context.payload.pull_request?.base?.sha
}
}
if (isShallow) {