diff --git a/api/controllers/v2/github.ts b/api/controllers/v2/github.ts index 6fe5b1c9d..bfa145bec 100644 --- a/api/controllers/v2/github.ts +++ b/api/controllers/v2/github.ts @@ -11,18 +11,18 @@ import { markBuildArtifactsForDeletion, validateJsonWebhook } from '../../handle import { DocsetsRepository } from '../../../src/repositories/docsetsRepository'; import { getMonorepoPaths } from '../../../src/monorepo'; import { getUpdatedFilePaths } from '../../../src/monorepo/utils/path-utils'; +import { ReposBranchesDocument } from '../../../modules/persistence/src/services/metadata/associated_products'; async function prepGithubPushPayload( githubEvent: PushEvent, repoBranchesRepository: RepoBranchesRepository, - docsetsRepository: DocsetsRepository, - prefix: string + prefix: string, + repoInfo: ReposBranchesDocument ): Promise> { const branch_name = githubEvent.ref.split('/')[2]; const branch_info = await repoBranchesRepository.getRepoBranchAliases(githubEvent.repository.name, branch_name); const urlSlug = branch_info.aliasObject?.urlSlug ?? branch_name; - const repo_info = await docsetsRepository.getRepo(githubEvent.repository.name); - const project = repo_info?.project ?? githubEvent.repository.name; + const project = repoInfo?.project ?? githubEvent.repository.name; return { title: githubEvent.repository.full_name, @@ -104,7 +104,7 @@ export const TriggerBuild = async (event: APIGatewayEvent): Promise