Skip to content

Commit

Permalink
feat: update newlines compensation
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangtao25 committed Jun 19, 2024
1 parent 7cad72d commit 3bb84dc
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ export class ConsumerCoverageService {
},
});
// 变更行数量0,不需要补偿
if ((allCoverage.summary as any).newlines.total === 0) {
if ((allCoverage.summary as any).newlines.total !== 0) {
// 查询agg类型的coverage
const aggCoverages = await this.prisma.coverage.findMany({
where: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ export class RetrieveCoverageTreeSummaryService {
reportID: params.reportID,
sha: params.sha,
covType: 'agg',
projectID: {
mode: 'insensitive', // Ignore case sensitivity
not: {
contains: '-ut',
},
},
}),
});

Expand All @@ -24,6 +30,12 @@ export class RetrieveCoverageTreeSummaryService {
where: removeNullKeys({
reportID: params.reportID,
sha: params.sha,
projectID: {
mode: 'insensitive', // Ignore case sensitivity
not: {
contains: '-ut',
},
},
}),
});
const project = await this.prisma.project.findFirst({
Expand All @@ -48,6 +60,12 @@ export class RetrieveCoverageTreeSummaryService {
where: {
sha,
covType: 'agg',
projectID: {
mode: 'insensitive', // Ignore case sensitivity
not: {
contains: '-ut',
},
},
},
});

Expand All @@ -67,6 +85,12 @@ export class RetrieveCoverageTreeSummaryService {
where: {
sha,
covType: 'all',
projectID: {
mode: 'insensitive', // Ignore case sensitivity
not: {
contains: '-ut',
},
},
},
});

Expand Down

0 comments on commit 3bb84dc

Please sign in to comment.