remove: unused code (#2014)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user