diff --git a/packages/canyon-backend/src/coverage/services/retrieve-coverage-tree-summary.service.ts b/packages/canyon-backend/src/coverage/services/retrieve-coverage-tree-summary.service.ts index 91bff1c3..551622c9 100755 --- a/packages/canyon-backend/src/coverage/services/retrieve-coverage-tree-summary.service.ts +++ b/packages/canyon-backend/src/coverage/services/retrieve-coverage-tree-summary.service.ts @@ -19,20 +19,25 @@ export class RetrieveCoverageTreeSummaryService { }); const commitSha = summaryFindFirst?.commitSha; - + const noCommitShaWithCoverage = await this.prisma.coverage.findFirst({ + where: removeNullKeys({ + reportID: params.reportID, + commitSha: params.sha, + }), + }); + const project = await this.prisma.project.findFirst({ + where: { + id: noCommitShaWithCoverage.projectID, + }, + }); if (!commitSha) { - const noCommitShaWithCoverage = await this.prisma.coverage.findFirst({ - where: removeNullKeys({ - reportID: params.reportID, - commitSha: params.sha, - }), - }); return { status: 'pending', reportIDs: [], sha: noCommitShaWithCoverage?.commitSha || '', statistics: emptyStatistics, projectID: noCommitShaWithCoverage?.projectID || '', + projectPathWithNamespace: project?.pathWithNamespace || '', }; } @@ -79,6 +84,7 @@ export class RetrieveCoverageTreeSummaryService { sha: commitSha, statistics: calculateCoverageOverviewByConditionFilter(summarys), projectID: coverage.projectID, + projectPathWithNamespace: project.pathWithNamespace, }; } }