diff --git a/src/services/db/GitHubService.ts b/src/services/db/GitHubService.ts index 0060eacb7..a0086d2e3 100644 --- a/src/services/db/GitHubService.ts +++ b/src/services/db/GitHubService.ts @@ -235,7 +235,7 @@ export default class GitHubService { async readMedia( sessionData: UserWithSiteSessionData, - { fileSha }: { fileSha: any; branchName?: string } + { fileSha }: { fileSha: string } ) { /** * Files that are bigger than 1 MB needs to be retrieved @@ -268,7 +268,7 @@ export default class GitHubService { async readDirectory( sessionData: UserWithSiteSessionData, - { directoryName }: { directoryName: any } + { directoryName }: { directoryName: string } ) { const { accessToken } = sessionData const { siteName } = sessionData @@ -514,8 +514,7 @@ export default class GitHubService { async getTree( sessionData: UserWithSiteSessionData, githubSessionData: GithubSessionData, - { isRecursive }: any, - isStaging = true + { isRecursive }: any ): Promise { const { accessToken } = sessionData const { siteName } = sessionData @@ -523,7 +522,7 @@ export default class GitHubService { const url = `${siteName}/git/trees/${treeSha}` const params = { - ref: isStaging ? STAGING_BRANCH : STAGING_LITE_BRANCH, + ref: STAGING_BRANCH, recursive: false, } diff --git a/src/services/db/RepoService.ts b/src/services/db/RepoService.ts index 9ffc5d60d..eacd93f07 100644 --- a/src/services/db/RepoService.ts +++ b/src/services/db/RepoService.ts @@ -363,9 +363,9 @@ export default class RepoService extends GitHubService { dirContent = result.value } else { - dirContent = (await super.readDirectory(sessionData, { + dirContent = await super.readDirectory(sessionData, { directoryName, - })) as GitDirectoryItem[] + }) } const { directories, files, total } = getPaginatedDirectoryContents(